Bug 26510 - [4.1/4.2/4.3 Regression] --disable-shared broken for darwin platform
Summary: [4.1/4.2/4.3 Regression] --disable-shared broken for darwin platform
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.1.0
: P3 normal
Target Milestone: 4.1.2
Assignee: Not yet assigned to anyone
URL:
Keywords: build
: 19176 29564 (view as bug list)
Depends on: 19176
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-01 13:21 UTC by Han-Wen Nienhuys
Modified: 2007-01-02 15:41 UTC (History)
4 users (show)

See Also:
Host: i386-redhat-linux
Target: i686-apple-darwin8
Build: i386-redhat-linux
Known to work:
Known to fail:
Last reconfirmed: 2006-10-23 15:24:19


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Han-Wen Nienhuys 2006-03-01 13:21:26 UTC
compiling with static libs for darwin breaks during compile with the following message.

MLIBS=`/home/hanwen/vc/gub/target/darwin-x86/build/gcc-4.1.0/./gcc/xgcc -B/home/hanwen/vc/gub/target/darwin-x86/build/gcc-4.1.0/./gcc/ -B/home/hanwen/vc/gub/target/darwin-x86/system/usr/cross//i686-apple-darwin8/bin/ -B/home/hanwen/vc/gub/target/darwin-x86/system/usr/cross//i686-apple-darwin8/lib/ -isystem /home/hanwen/vc/gub/target/darwin-x86/system/usr/cross//i686-apple-darwin8/include -isystem /home/hanwen/vc/gub/target/darwin-x86/system/usr/cross//i686-apple-darwin8/sys-include --print-multi-lib \
        | sed -e 's/;.*$//' -e '/^\.$/d' -e 's/^/_/'` ; \
for mlib in '' $MLIBS ; do \
  i686-apple-darwin8-strip -o libgcc_s.10.4.dylib_T${mlib} \
    -s /home/hanwen/vc/gub/target/darwin-x86/src/gcc-4.1.0/gcc/config/i386/darwin-libgcc.10.4.ver -c -u \
    libgcc_s${mlib}.1.dylib || exit 1 ; \
done
i686-apple-darwin8-strip: can't open file: libgcc_s.1.dylib (No such file or directory)
make[3]: *** [libgcc_s.10.4.dylib] Fout 1
make[3]: Leaving directory `/home/hanwen/vc/gub/target/darwin-x86/build/gcc-4.1.0/gcc'
make[2]: *** [all-gcc] Fout 2
Comment 1 Andrew Pinski 2006-03-01 13:30:37 UTC
Related to PR 19176.  But static is almost never supported on Darwin anyways.
Comment 2 Andrew Pinski 2006-03-01 15:45:53 UTC
I should mention that i686-darwin is not supported in any way shape or form for GCC's before 4.2.0.
Comment 3 Han-Wen Nienhuys 2006-03-01 16:04:16 UTC
I guess that means that 4.2 snapshots don't count, and that I should stick to Apple's sources, right?
Comment 4 Andrew Pinski 2006-10-23 15:22:28 UTC
*** Bug 29564 has been marked as a duplicate of this bug. ***
Comment 5 Andrew Pinski 2006-10-23 15:24:19 UTC
Caused by:
2005-09-28  Geoffrey Keating  <geoffk@apple.com>

        * config/rs6000/t-darwin8: Uncomment contents, allow -m64
        multilib to be built.

        * Makefile.in: Export LIPO_FOR_TARGET, STRIP_FOR_TARGET.
        (stage1-start): Delete old libgcc and libunwind before moving
        anything into the stage directory.
        (stage2-start): Likewise.
        (stage3-start): Likewise.
        (stage4-start): Likewise.
Comment 6 Dale Ranta 2006-10-23 19:02:17 UTC
I tried to disable the multilib with -

../gcc/configure --disable-shared --disable-multilib --prefix=/usr/local/gfortran --enable-languages=c,fortran

but I still about the save errors -

MLIBS=`/Users/dir/gfortran/ibin2/./gcc/xgcc -B/Users/dir/gfortran/ibin2/./gcc/ -B/usr/local/gfortran/powerpc-apple-darwin8.8.0/bin/ -B/usr/local/gfortran/powerpc-apple-darwin8.8.0/lib/ -isystem /usr/local/gfortran/powerpc-apple-darwin8.8.0/include -isystem /usr/local/gfortran/powerpc-apple-darwin8.8.0/sys-include --print-multi-lib \
        | sed -e 's/;.*$//' -e '/^\.$/d'` ; \
for mlib in '' $MLIBS ; do \
  strip -o libgcc_s.10.5.dylib_T${mlib} \
    -s ../../gcc/gcc/config/rs6000/darwin-libgcc.10.5.ver -c -u \
    ./${mlib}/libgcc_s.1.dylib.tmp || exit 1 ; \
done
strip: can't open file: /Users/dir/gfortran/ibin2/gcc/libgcc_s.1.dylib.tmp (No such file or directory)
make[3]: *** [libgcc_s.10.4.dylib] Error 1
make[3]: *** Waiting for unfinished jobs....
strip: can't open file: /Users/dir/gfortran/ibin2/gcc/libgcc_s.1.dylib.tmp (No such file or directory)
make[3]: *** [libgcc_s.10.5.dylib] Error 1
rm fsf-funding.pod gcov.pod gfdl.pod cpp.pod gpl.pod gcc.pod
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2
[dranta:~/gfortran/ibin2] dir% 

Comment 7 Geoff Keating 2006-10-29 20:29:24 UTC
I think I'll just declare that GCC requires a shared libgcc on Darwin.
Comment 8 Dale Ranta 2006-10-30 13:58:54 UTC
Fixing the errors that are shown above is trivial - so I assume that they are just the first of a cascade of errors in trying to fix the problem. Having a shared libgcc is Ok - the real problem is distributing version of programs compilied with gfortran to people that do not have gfortran installed. --disable-shared appears to be the only way to do it - I tried just loading the static libraries, but a few dependencies on the shared parts remained.
Comment 9 Andrew Pinski 2006-12-24 06:21:12 UTC
*** Bug 19176 has been marked as a duplicate of this bug. ***
Comment 10 Dale Ranta 2006-12-26 13:57:20 UTC
This is no problem with g95. You can move files to other Macintosh computers without g95 istalled and use them. This really is quite important, the usefulness of gfortran is greatly limited without this ablity. Programs built with gfortran cannot be distributed to a general group of users.
Comment 11 Andrew Pinski 2006-12-26 18:07:06 UTC
(In reply to comment #10)
> This is no problem with g95. 

That is because g95's library is not fully integrated at all in GCC's build infrastructure at all.
You can use just disable's gfortran shared library anyways, See the installation documentation which describes how to do that.
Comment 12 Dale Ranta 2007-01-02 15:41:00 UTC
    Hi Andrew,

    I thought that was the problem - there appears to be no way to disable the shared libraries on the Macintosh. In comment #6, I tried to disable the shared libraries and the multilib with "--disable-shared --disable-multilib". Where do I find the installation documentation ? Does the installation documentation tell another way to do it ?