public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/24909]  New: libmatmul.a breaks darwin build
@ 2005-11-16 22:56 andreast at gcc dot gnu dot org
  2005-11-16 23:00 ` [Bug libfortran/24909] " jb at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: andreast at gcc dot gnu dot org @ 2005-11-16 22:56 UTC (permalink / raw)
  To: gcc-bugs

This patch breaks the build of libgfortran on darwin.

http://gcc.gnu.org/ml/gcc-cvs/2005-11/msg00601.html

-all_load  ./.libs/libmatmul.a   -lm ./.libs/libmatmul.a  -lc
-Wl,-single_module -install_name 
/Volumes/export/gcc/gcc-svn/head/testbin/lib/libgfortran.0.dylib
-compatibility_version 1 -current_version 1.0
ld: multiple definitions of symbol __gfortran_matmul_i4
./.libs/libmatmul.a(libmatmul_la-matmul_i4.o) definition of
__gfortran_matmul_i4 in section (__TEXT,__text)
./.libs/libmatmul.a(libmatmul_la-matmul_i4.o) definition of
__gfortran_matmul_i4 in section (__TEXT,__text)

The reason is that the link command tries to link two times the libmatmul.a
which gives the duplicates.

Atm, I have not a solution handy, but it seems to me that using convenience
library scheme would be the solution.

Modifying the libtool and removing the $convenience part in libtools
whole_archive_flag_spec makes it link and pass the testsuite.

Sorry for not posting a solution right now. Moving pressure :)


-- 
           Summary: libmatmul.a breaks darwin build
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: andreast at gcc dot gnu dot org
 GCC build triplet: powerpc-apple-darwin8.3.0
  GCC host triplet: powerpc-apple-darwin8.3.0
GCC target triplet: powerpc-apple-darwin8.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24909


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libfortran/24909] libmatmul.a breaks darwin build
  2005-11-16 22:56 [Bug libfortran/24909] New: libmatmul.a breaks darwin build andreast at gcc dot gnu dot org
@ 2005-11-16 23:00 ` jb at gcc dot gnu dot org
  2005-11-17  8:26 ` jb at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jb at gcc dot gnu dot org @ 2005-11-16 23:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jb at gcc dot gnu dot org  2005-11-16 23:00 -------
As discussed on IRC, the solution is to use noinst_LTLIBRARIES instead of
EXTRA_LTLIBRARIES. It was also suggested to name the library
libmatmul_convenience.a. Example in libffi/Makefile.am


-- 

jb at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jb at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-11-16 23:00:41
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24909


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libfortran/24909] libmatmul.a breaks darwin build
  2005-11-16 22:56 [Bug libfortran/24909] New: libmatmul.a breaks darwin build andreast at gcc dot gnu dot org
  2005-11-16 23:00 ` [Bug libfortran/24909] " jb at gcc dot gnu dot org
@ 2005-11-17  8:26 ` jb at gcc dot gnu dot org
  2005-11-17 14:37 ` andreast at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jb at gcc dot gnu dot org @ 2005-11-17  8:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jb at gcc dot gnu dot org  2005-11-17 08:26 -------
Patch here: http://gcc.gnu.org/ml/gcc-patches/2005-11/msg01271.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24909


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libfortran/24909] libmatmul.a breaks darwin build
  2005-11-16 22:56 [Bug libfortran/24909] New: libmatmul.a breaks darwin build andreast at gcc dot gnu dot org
  2005-11-16 23:00 ` [Bug libfortran/24909] " jb at gcc dot gnu dot org
  2005-11-17  8:26 ` jb at gcc dot gnu dot org
@ 2005-11-17 14:37 ` andreast at gcc dot gnu dot org
  2005-11-17 22:35 ` geoffk at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: andreast at gcc dot gnu dot org @ 2005-11-17 14:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from andreast at gcc dot gnu dot org  2005-11-17 14:37 -------
Unfortunately it does not werk :(

I found this message in the libtool archive:

http://lists.gnu.org/archive/html/libtool-patches/2004-08/msg00002.html

Currently we have this 'whole_archive_flag_spec='-all_load $convenience''

in gcc-root/ltcf-c.sh (for darwin)

Is this needed somehwere?

Maybe we could remove this -all_load $convenience' entry in the ltcf-c.sh? 
Geoff?

Doing so by hand in the gfortran libtool makes the library link.


-- 

andreast at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |geoffk at apple dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24909


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libfortran/24909] libmatmul.a breaks darwin build
  2005-11-16 22:56 [Bug libfortran/24909] New: libmatmul.a breaks darwin build andreast at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-11-17 14:37 ` andreast at gcc dot gnu dot org
@ 2005-11-17 22:35 ` geoffk at gcc dot gnu dot org
  2005-11-17 22:55 ` andreast at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: geoffk at gcc dot gnu dot org @ 2005-11-17 22:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from geoffk at gcc dot gnu dot org  2005-11-17 22:35 -------
It's certainly wrong to be using -all-load unless you're also using -r.


-- 

geoffk at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |geoffk at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24909


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libfortran/24909] libmatmul.a breaks darwin build
  2005-11-16 22:56 [Bug libfortran/24909] New: libmatmul.a breaks darwin build andreast at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-11-17 22:35 ` geoffk at gcc dot gnu dot org
@ 2005-11-17 22:55 ` andreast at gcc dot gnu dot org
  2005-11-18 14:31 ` andreast at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: andreast at gcc dot gnu dot org @ 2005-11-17 22:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from andreast at gcc dot gnu dot org  2005-11-17 22:54 -------
would this snippet be ok? 

Index: ltcf-c.sh
===================================================================
--- ltcf-c.sh   (revision 107140)
+++ ltcf-c.sh   (working copy)
@@ -419,7 +419,7 @@
     hardcode_direct=no
     hardcode_automatic=yes
     hardcode_shlibpath_var=unsupported
-    whole_archive_flag_spec='-all_load $convenience'
+    whole_archive_flag_spec=''
     link_all_deplibs=yes
     ;;



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24909


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libfortran/24909] libmatmul.a breaks darwin build
  2005-11-16 22:56 [Bug libfortran/24909] New: libmatmul.a breaks darwin build andreast at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-11-17 22:55 ` andreast at gcc dot gnu dot org
@ 2005-11-18 14:31 ` andreast at gcc dot gnu dot org
  2005-11-19  8:38 ` ebotcazou at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: andreast at gcc dot gnu dot org @ 2005-11-18 14:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from andreast at gcc dot gnu dot org  2005-11-18 14:31 -------
On sparc-solaris I get runtime failures:

collect2: ld returned 1 exit status^M
compiler exited with status 1
output is:
Undefined                       first referenced^M
 symbol                             in file^M
_gfortran_matmul_r4                 /var/tmp//ccKKiCDj.o^M
ld: fatal: Symbol referencing errors. No output written to ./matmul_1.exe^M
collect2: ld returned 1 exit status^M

this is with both, the original libmatmul and with libmatmul_convenience.
(using native, sun, as and ld)

I try to investigate deeper by next week. If I do not get beaten by others :)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24909


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libfortran/24909] libmatmul.a breaks darwin build
  2005-11-16 22:56 [Bug libfortran/24909] New: libmatmul.a breaks darwin build andreast at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-11-18 14:31 ` andreast at gcc dot gnu dot org
@ 2005-11-19  8:38 ` ebotcazou at gcc dot gnu dot org
  2005-11-20 21:39 ` jb at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-11-19  8:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ebotcazou at gcc dot gnu dot org  2005-11-19 08:38 -------
> On sparc-solaris I get runtime failures:
> 
> collect2: ld returned 1 exit status^M
> compiler exited with status 1
> output is:
> Undefined                       first referenced^M
>  symbol                             in file^M
> _gfortran_matmul_r4                 /var/tmp//ccKKiCDj.o^M
> ld: fatal: Symbol referencing errors. No output written to ./matmul_1.exe^M
> collect2: ld returned 1 exit status^M
> 
> this is with both, the original libmatmul and with libmatmul_convenience.
> (using native, sun, as and ld)

Confirmed with all versions of Solaris.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24909


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libfortran/24909] libmatmul.a breaks darwin build
  2005-11-16 22:56 [Bug libfortran/24909] New: libmatmul.a breaks darwin build andreast at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-11-19  8:38 ` ebotcazou at gcc dot gnu dot org
@ 2005-11-20 21:39 ` jb at gcc dot gnu dot org
  2005-11-21  9:02 ` ebotcazou at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jb at gcc dot gnu dot org @ 2005-11-20 21:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jb at gcc dot gnu dot org  2005-11-20 21:39 -------
rth committed a fix to trunk and 4.1:
http://gcc.gnu.org/ml/fortran/2005-11/msg00548.html

It should now work again on all supported platforms.

Unless new problems are reported I'll close this in a few days.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24909


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libfortran/24909] libmatmul.a breaks darwin build
  2005-11-16 22:56 [Bug libfortran/24909] New: libmatmul.a breaks darwin build andreast at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-11-20 21:39 ` jb at gcc dot gnu dot org
@ 2005-11-21  9:02 ` ebotcazou at gcc dot gnu dot org
  2005-11-22  8:59 ` jb at gcc dot gnu dot org
  2005-11-22 16:04 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-11-21  9:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from ebotcazou at gcc dot gnu dot org  2005-11-21 09:02 -------
> It should now work again on all supported platforms.

Confirmed on all versions of Solaris.  Thanks!


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24909


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libfortran/24909] libmatmul.a breaks darwin build
  2005-11-16 22:56 [Bug libfortran/24909] New: libmatmul.a breaks darwin build andreast at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2005-11-21  9:02 ` ebotcazou at gcc dot gnu dot org
@ 2005-11-22  8:59 ` jb at gcc dot gnu dot org
  2005-11-22 16:04 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: jb at gcc dot gnu dot org @ 2005-11-22  8:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jb at gcc dot gnu dot org  2005-11-22 08:59 -------
With the fix by rth, it seems to work again on Solaris (#9) and Darwin (
http://gcc.gnu.org/ml/fortran/2005-11/msg00571.html ); closing the bug.


-- 

jb at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24909


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug libfortran/24909] libmatmul.a breaks darwin build
  2005-11-16 22:56 [Bug libfortran/24909] New: libmatmul.a breaks darwin build andreast at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2005-11-22  8:59 ` jb at gcc dot gnu dot org
@ 2005-11-22 16:04 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-22 16:04 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24909


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-11-22 16:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-16 22:56 [Bug libfortran/24909] New: libmatmul.a breaks darwin build andreast at gcc dot gnu dot org
2005-11-16 23:00 ` [Bug libfortran/24909] " jb at gcc dot gnu dot org
2005-11-17  8:26 ` jb at gcc dot gnu dot org
2005-11-17 14:37 ` andreast at gcc dot gnu dot org
2005-11-17 22:35 ` geoffk at gcc dot gnu dot org
2005-11-17 22:55 ` andreast at gcc dot gnu dot org
2005-11-18 14:31 ` andreast at gcc dot gnu dot org
2005-11-19  8:38 ` ebotcazou at gcc dot gnu dot org
2005-11-20 21:39 ` jb at gcc dot gnu dot org
2005-11-21  9:02 ` ebotcazou at gcc dot gnu dot org
2005-11-22  8:59 ` jb at gcc dot gnu dot org
2005-11-22 16:04 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).