Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

make error on Mac OSX 10.6.1

Help
David
2009-10-26
2013-04-22
  •  David
    David
    2009-10-26

    I am trying to get BRL-CAD up and running on my Mac OSX 10.6.1.  I downloaded the source and have performed the following steps:

    unpacked: brlcad-7.16.0.tar.gz
    in terminal window:
    sh autogen.sh
    ./configure -enable-optimized -enable-all
    make

    ..which then prints quite a few lines and ends with this error:

        /bin/sh ../../../libtool -silent -tag=CC -mode=link gcc  -pipe -fno-strict-aliasing -fno-common -fexceptions -g -O3  -L/usr/local/lib -L/usr/X11/lib -pipe -fno-strict-aliasing -fno-common -fexceptions -Wl,-search_paths_first -Wnewline-eof -g -O3 -o libopenNURBS.la -rpath /usr/brlcad/lib   libopenNURBS_nil.la
        ld: in .libs/libopenNURBS.lax/libopenNURBS_nil.a/libopenNURBS_nil_la-opennurbs_font.o, in section __TEXT,__text reloc 38: local relocation for address 0x000008A8 in section __text does not target section __const
        collect2: ld returned 1 exit status
        make: ***  Error 1
        make: ***  Error 1
        make: ***  Error 1
        make: ***  Error 1

    Not sure where to proceed.  Any help would be much appreciated.  Has anyone got BRL-CAD to work with Mac OSX 10.6.1 (Snow Leopard)?

    Thanks in advance,
    David

     
  • Sean Morrison
    Sean Morrison
    2009-10-27

    David,

    Hm, that is one I've not seen before.  At a glance, it looks like a bug in the linker.  A message on the apple mailing list seems to corroborate that theory as it's a problem at the assembly level which is causing the linker to fail.

    There's nothing fundamentally specific about 10.6.1 that would likely cause this other than Apple using an old version of gcc.  There may be a workaround but it's going to take some low-level investigation by a dev, not something I could just walk you through.

    At the expense of disk space, you can try to compile everything static (-disable-shared during configure).  It'll eat up a LOT more disk space, but will utilize an entirely different linker mechanism that might get around this issue.

    Thanks for reporting it regardless.

    Cheers!
    Sean

     
  •  David
    David
    2009-10-27

    Hi Sean,

    Thanks for the quick reply.  I tried to compile with: "./configure -enable-optimized -enable-all -disable-shared" and got the same result as the original post after running make.

    Just in case it helps, after I run sh autogen.sh, here are the version numbers that are reported:

        Preparing the BRL-CAD build system…please wait
       
        Found GNU Autoconf version 2.62
        Found GNU Automake version 1.9.6
        Found GNU Libtool version 1.5.26

    Thanks for your help.

    Best,
    David

     
  • Sean Morrison
    Sean Morrison
    2009-12-08

    After you run autogen.sh, re-run configure, then run "make clean", then retry make.  Any better?

     
  •  David
    David
    2009-12-08

    Hi Sean,

    I am now trying things with Snow Leopard v10.6.2, but still get the same error.  I tried the following commands:

        >> cd tempFolder/brlcad-7.16.2
        >> sh autogen.sh
        >> ./configure -enable-optimized -enable-all
        >> make clean
        >> make

    Any other ideas?

    Thanks,
    David

     
  • Sean Morrison
    Sean Morrison
    2009-12-09

    David, I just remembered why your report sounded so familiar.  We encountered that bug on our systems leading up to the 7.16.2 release.  It's actually an optimization bug in GCC.  Take -enable-optimized off of your configure line and it should build without the error in openNURBS.

    If you still want optimized, you can build with:  ./configure -enable-all CFLAGS=-O2 CXXFLAGS=-O2

    Cheers!
    Sean

     
  •  David
    David
    2009-12-10

    Sean,

    So I have gotten farther than ever before, but now I am getting the following error:

    gcc -pipe -dynamiclib -O2 -g -Wall -Wno-implicit-int -fno-common -prebind -headerpad_max_install_names -Wl,-search_paths_first  -prebind -headerpad_max_install_names -Wl,-search_paths_first  -Wl,-single_module -o libTkhtml3.0.dylib css.o cssdynamic.o cssparser.o csssearch.o htmldraw.o htmlfloat.o htmlhash.o htmlimage.o htmlinline.o htmllayout.o htmlparse.o htmlprop.o htmlstyle.o htmltagdb.o htmltable.o htmltcl.o htmltree.o swproc.o restrack.o htmldecode.o htmltext.o htmlutil.o cssprop.o -lX11 -lXext -lXi  -L/Users/dwwagner/Desktop/brlcad-7.16.2/src/other/tcl/unix -ltclstub8.5 -L/Users/dwwagner/Desktop/brlcad-7.16.2/src/other/tk/unix -ltkstub8.5
    ld: library not found for -lX11

    Which I don't quite understand since when I run ./Configure —enable-all, it seems like the -lX11 library is found:

    checking X11/Xlib.h usability… yes
    checking X11/Xlib.h presence… yes
    checking for X11/Xlib.h… yes
    checking for XCreateWindow in -lX11… yes
    checking for XShapeCombineMask in -lXext… yes
    checking for XGetExtensionVersion in -lXi… yes

    Once again, I am running the following commands:

        >> sh autogen.sh
        >> ./configure -enable-all
        >> make clean
        >> make

    Thanks for your help.

     
  • Sean Morrison
    Sean Morrison
    2009-12-10

    Can you paste your configure summary?  It the section at the end of configure that has a bunch of "…….." lines summarizing the build.

     
  •  David
    David
    2009-12-10

    Sure it is:

        BRL-CAD Release 7.16.2, Build 20091210
       
                     Prefix: /usr/brlcad
                   Binaries: /usr/brlcad/bin
               Manual pages: /usr/brlcad/share/man
        Configuration files: /usr/brlcad/etc
        Data resource files: /usr/brlcad/share/brlcad/7.16.2
        Options & variables: -enable-all
       
        CC       = gcc
        CXX      = g++
        CFLAGS   = -pipe -fno-strict-aliasing -fno-common -fexceptions -g
        CXXFLAGS = -pipe -fno-strict-aliasing -fno-common -fexceptions -g
        CPPFLAGS = -I/usr/local/include -I/usr/X11/include -DBRLCADBUILD=1 -I${top_srcdir}/include -I${top_srcdir}/src/other/openNURBS ${LIBZ_CPPFLAGS}
        LDFLAGS  = -L/usr/local/lib -L/usr/X11/lib -pipe -fno-strict-aliasing -fno-common -fexceptions -Wl,-search_paths_first -Wnewline-eof -g
       
        Build Tcl ……………………….: yes
        Build Tk ………………………..: yes
        Build Itcl/Itk …………………..: yes
        Build IWidgets …………………..: yes
        Build tkhtml3 ……………………: yes
        Build tkImg ……………………..: yes
        Build libpng …………………….: yes
        Build libregex …………………..: yes
        Build zlib ………………………: yes
        Build termlib ……………………: yes
        Build Utah Raster Toolkit………….: yes
        Build Template Numerical Toolkit……: yes
        Build openNURBS…………………..: yes
        Build NIST STEP Class Libraries…….: yes
        Build jove ………………………: yes
       
        X11 support (optional)…………….: yes
        OpenGL support (optional)………….: no
        librtserver JDK support (optional)….: yes
        Enable run-time debugging (optional)..: yes
       
        Build 64-bit release ……………..: yes
        Build optimized release …………..: no
        Build debug release ………………: yes
        Build profile release …………….: no
        Build SMP-capable release …………: yes
        Build static libraries ……………: yes
        Build shared/dynamic libraries …….: yes
        Print verbose compilation warnings …: no
        Print verbose compilation progress …: no
       
        Only build benchmark suite ………..: no
        Only build librtserver ……………: no
        Install example geometry models ……: yes
        Install extra docs ……………….: yes (man/html only)
       
        Elapsed configuration time ………..: 2 minutes, 8 seconds

     
  • Sean Morrison
    Sean Morrison
    2009-12-11

    That is very odd.  If you run:

        locate libX11

    what does it report?

    Should see something like this:

        $ locate libX11
        /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib/libX11.6.2.dylib
        /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib/libX11.6.dylib
        /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib/libX11.a
        /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib/libX11.dylib
        /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libX11.6.2.0.dylib
        /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libX11.6.dylib
        /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libX11.dylib
        /usr/X11/lib/libX11.6.2.0.dylib
        /usr/X11/lib/libX11.6.dylib
        /usr/X11/lib/libX11.dylib
        /usr/X11/lib/libX11.la

    The last few in /usr/X11/lib are the important ones.  If you do see them, try this:

        make LDFLAGS=-L/usr/X11/lib

    See if it gets any further.

    Cheers!
    Sean

     
  •  David
    David
    2009-12-11

    Hi Sean,

    I just got all the way through the make process using 'make LDFLAGS=-L/usr/X11/lib'

    So far so good.  I will let you know if I am fully successful (hopefully later today!).

     
  • Sean Morrison
    Sean Morrison
    2009-12-11

    That's good to hear, and is a little surprising.  It's acting as if it found an older version of automake with the old (faultly) X11 tests instead of the newer (fixed) ones that are now installed on Mac.  Do you have 'fink' or bsd 'ports' or 'portage' where it might have picked up a non-apple set of automake X11 tests?

     
  •  David
    David
    2009-12-11

    Whew!  I was able to run mged.  Now I just need to learn how to use it.  I can believe something might have been a bit messed up with older versions of automake.  I have been upgrading OSs and hardware with (never a clean install) for quite some time now.  I recall installing fink a few iterations ago, but never really used it for anything.  I guess I should think about doing a clean install to make my life a little simpler.

    In the mean time…
    Thanks for your help as now brl-cad is up and running!

     
  • Sean Morrison
    Sean Morrison
    2009-12-11

    Aha!  That more than likely is the cause of your somewhat unique build problems.  Fink sets itself up to modify your search paths so it looks in fink's directories first.  Especially if your install is old, that would easily explain the problem.  The symptoms fit perfectly.  You might want to remove fink, but glad to hear it's all working.

    For getting started with learning MGED (one of BRL-CAD's many tools), there are extensive docs on the website ( ) that you should start with (don't try without at least going through a few tutorials).  They should be considered required reading and will give you just the basic skills for getting started at becoming proficient.

    Cheers!
    Sean

      : http://brlcad.org/wiki/Documentation