Hi all -

Did the archived solution below work for you?   I'm trying to install and having exactly the same issue, and this doesn't seem to solve my problem.  I'm running OSX 10.5, and my default version of gcc is 4.0.1:

%  gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)

I've installed gcc-4.2, but it won't take the "-shared" flag.

%  gcc-4.2 -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: ../gcc-4.2.4/configure --prefix=/sw --prefix=/sw/lib/gcc4.2 --mandir=/sw/share/man --infodir=/sw/share/info --enable-languages=c,c++,fortran,objc,java --with-arch=nocona --with-tune=generic --host=i686-apple-darwin9 --with-gmp=/sw --with-libiconv-prefix=/sw --with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --disable-libjava-multilib
Thread model: posix
gcc version 4.2.4


Using either gcc-4.0.1 or gcc-4.2, I still get a compilation error that it couldn't find main:

% make -f Makefile-libbz2_so CFLAGS=-fPIC LDFLAGS=-fPIC PREFIX=/Users/rieth/yt_analysis
gcc -shared -Wl,-install_name -Wl,libbz2.so.1.0 -o libbz2.so.1.0.4 blocksort.o huffman.o crctable.o randtable.o compress.o decompress.o bzlib.o
Undefined symbols:
  "_main", referenced from:
      start in crt1.10.5.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [all] Error 1

I'm sure I'm doing something really stupid, but I can't figure out what it is.  Can anyone help?  (Also, sorry for the cut-and-paste; I couldn't figure out how to reply directly to the archived post.)

Thanks,
Dave



--------------------------------------------------------------------

Matthew Turk wrote:

Hi JC,

Are you setting CC and CXX to gcc-4.2 and g++-4.2, as the note in the
install script mentions you might have to?  I believe that it's
getting the OSX gcc, which would use the "-bundle" argument, but it
should instead be getting the old-school gcc-4.2, which accepts
"-shared".

-Matt

On Wed, May 18, 2011 at 3:03 PM, Jean-Claude Passy <jcpassy at gmail.com> wrote:
> Hi all,
>
> I am able to install yt on my Mac if I turn off the Bzlib option. When it is
> turned on, the installation fails the following way:
>
> -----------------------------------------------------------------------------------------------------------------------------
> echo ".so man1/bzgrep.1" >
> /Users/jean-claudepassy/Work/yt-i386/man/man1/bzegrep.1 echo ".so
> man1/bzgrep.1" > /Users/jean-claudepassy/Work/yt-i386/man/man1/bzfgrep.1
> echo ".so man1/bzmore.1" >
> /Users/jean-claudepassy/Work/yt-i386/man/man1/bzless.1 echo ".so
> man1/bzdiff.1" > /Users/jean-claudepassy/Work/yt-i386/man/man1/bzcmp.1 gcc
> -shared -Wl,-install_name -Wl,libbz2.so.1.0 -o libbz2.so.1.0.4 blocksort.o
> huffman.o crct\ able.o randtable.o compress.o decompress.o bzlib.o Undefined
> symbols:   "_main", referenced from:       start in crt1.10.5.o ld:
> symbol(s) not found collect2: ld returned 1 exit status make: *** [all]
> Error 1
> -----------------------------------------------------------------------------------------------------------------------------
>
> Does anyone have an idea how to fix this ?
>
> Thanks a lot,
>
> JC
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-- 
-------------------------------------------------
David A. Riethmiller
Ph.D. Candidate, Astrophysical Institute
Ohio University

Clippinger Labs 338
http://www.phy.ohiou.edu/~rieth/