Menu

Failed to compile on Solaris 10

Help
2010-08-28
2013-04-22
  • Murray Blakeman

    Murray Blakeman - 2010-08-28

    I'm trying to compile BRL-CAD 7.16.10 on Solaris 10 (latest version with updates) but it failed during the compile.

    This is the process

    $ sh autogen.sh
    Preparing the BRL-CAD build system...please wait
    Found GNU Autoconf version 2.67
    Found GNU Automake version 1.11
    Found GNU Libtool version 2.2.10
    Automatically preparing build ... done
    The BRL-CAD build system is now prepared.  To build here, run:
      ./configure
      make
    $ ./configure --prefix=/opt/mbl --sysconfdir=/etc --mandir=/opt/mbl/share/man --enable-shared --disable-static --with-ogl
    .
    .
    BRL-CAD Release 7.16.10, Build 20100828
                 Prefix: /opt/mbl
               Binaries: /opt/mbl/bin
           Manual pages: /opt/mbl/share/man
    Configuration files: /etc
    Data resource files: /opt/mbl/share
    Options & variables:  '--prefix=/opt/mbl' '--sysconfdir=/etc' '--mandir=/opt/mbl/share/man' '--enable-shared' '--disable-static' '--with-ogl' 'LDFLAGS= -L/opt/mbl/lib -R/opt/mbl/lib ' 'CPPFLAGS= -I/opt/mbl/include '
    CC       = gcc
    CXX      = g++
    CFLAGS   = -pipe -fno-strict-aliasing -fno-common -fexceptions -ggdb3 -D_FORTIFY_SOURCE=2 -w
    CXXFLAGS = -pipe -fno-strict-aliasing -fno-common -fexceptions -ggdb3 -D_FORTIFY_SOURCE=2 -w
    CPPFLAGS = -I/opt/mbl/include -DBRLCADBUILD=1 -I${top_srcdir}/include -I${top_srcdir}/src/other/openNURBS ${LIBZ_CPPFLAGS}
    LDFLAGS  = -L/opt/mbl/lib -R/opt/mbl/lib -pipe -fno-strict-aliasing -fno-common -fexceptions -ggdb3 -D_FORTIFY_SOURCE=2 -w
    Build Tcl ............................: yes
    Build Tk .............................: yes
    Build Itcl/Itk .......................: yes
    Build IWidgets .......................: yes
    Build tkhtml3 ........................: yes
    Build tkpng ..........................: yes
    Build libpng .........................: no (using system)
    Build libregex .......................: no (using system)
    Build zlib ...........................: no (using system)
    Build termlib ........................: no (using system)
    Build Utah Raster Toolkit.............: yes
    Build Template Numerical Toolkit......: yes
    Build openNURBS.......................: yes
    Build NIST STEP Class Libraries.......: yes
    X11 support (optional)................: yes
    OpenGL support (optional).............: yes
    librtserver JDK support (optional)....: no
    Enable run-time debugging (optional)..: yes
    Build 64-bit release .................: no (32-bit)
    Build optimized release ..............: no
    Build debug release ..................: auto
    Build profile release ................: no
    Build SMP-capable release ............: yes
    Build static libraries ...............: no
    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 ...........: 47 seconds
    ---
    ./configure complete, type 'make' to begin building
    $ gmake
    .
    .
    .
    .
    /bin/bash ../../../libtool --silent  --tag=CXX  --silent --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../include   -I/opt/mbl/include -DBRLCADBUILD=1 -I../../../include -I../../../src/other/openNURBS   -w -pipe -fno-strict-aliasing -fno-common -fexceptions -ggdb3 -D_FORTIFY_SOURCE=2 -w -c -o libopenNURBS_nil_la-opennurbs_beziervolume.lo `test -f 'opennurbs_beziervolume.cpp' || echo './'`opennurbs_beziervolume.cpp
    opennurbs_brep_region.cpp: In member function `ON_Brep* ON_BrepRegion::RegionBoundaryBrep(ON_Brep*) const':
    opennurbs_brep_region.cpp:1147: error: expected primary-expression before numeric constant
    opennurbs_brep_region.cpp:1147: error: expected `;' before numeric constant
    opennurbs_brep_region.cpp:1156: error: request for member `Count' in `1', which is of non-class type `int'
    opennurbs_brep_region.cpp:1158: error: invalid types `int[int]' for array subscript
    opennurbs_brep_region.cpp:1161: error: request for member `Count' in `1', which is of non-class type `int'
    opennurbs_brep_region.cpp:1163: error: request for member `Append' in `1', which is of non-class type `int'
    opennurbs_brep_region.cpp:1170: error: request for member `Count' in `1', which is of non-class type `int'
    opennurbs_brep_region.cpp:1172: error: request for member `Count' in `1', which is of non-class type `int'
    opennurbs_brep_region.cpp:1175: error: invalid types `int[int]' for array subscript
    gmake[3]: *** [libopenNURBS_nil_la-opennurbs_brep_region.lo] Error 1
    gmake[3]: *** Waiting for unfinished jobs....
    gmake[3]: Leaving directory `/export/storage/working/brlcad/src/brlcad-7.16.10/src/other/openNURBS'
    gmake[2]: *** [all-recursive] Error 1
    gmake[2]: Leaving directory `/export/storage/working/brlcad/src/brlcad-7.16.10/src/other'
    gmake[1]: *** [all-recursive] Error 1
    gmake[1]: Leaving directory `/export/storage/working/brlcad/src/brlcad-7.16.10/src'
    gmake: *** [all-recursive] Error 1
    

    Am I missing an include file?

    Thanks

     
  • Sean Morrison

    Sean Morrison - 2010-08-31

    From the error line, the problem has to be in some system header defining a symbol that openNURBS is using.  From the file:line (opennurbs_brep_region.cpp:1147), I have to imagine that the problem symbol is "FS".

    You can try adding the following line before opennurbs_brep_region:1147 to see if the error changes:
    #undef FS

    Cheers!
    Sean

     
  • Alex Per

    Alex Per - 2011-03-04

    Hi…

    I am failing to compile Brlcad-7.18.2 in an OpenSolaris machine too

    inftrees.c: In function `inflate_table':
    inftrees.c:330: warning: visibility attribute not supported in this configuration; ignored
    /bin/sh ../../../libtool --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../../include   -DBRLCADBUILD=1 -I../../../include -I../../../src/other/openNURBS -I../../../src/other/libz  -pipe -fno-strict-aliasing -fno-common -fexceptions -ggdb3 -D_FORTIFY_SOURCE=2 -pedantic -W -Wall -Wundef -Wfloat-equal -Wshadow -Winline -Wno-long-long -c -o trees.lo trees.c
    In file included from trees.c:119:
    trees.h:100: warning: visibility attribute not supported in this configuration; ignored
    trees.h:116: warning: visibility attribute not supported in this configuration; ignored
    trees.c: In function `_tr_init':
    trees.c:410: warning: visibility attribute not supported in this configuration; ignored
    trees.c: In function `_tr_stored_block':
    trees.c:883: warning: visibility attribute not supported in this configuration; ignored
    trees.c: In function `_tr_align':
    trees.c:919: warning: visibility attribute not supported in this configuration; ignored
    trees.c: In function `_tr_flush_block':
    trees.c:1020: warning: visibility attribute not supported in this configuration; ignored
    trees.c: In function `_tr_tally':
    trees.c:1071: warning: visibility attribute not supported in this configuration; ignored
    /bin/sh ../../../libtool --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../../include   -DBRLCADBUILD=1 -I../../../include -I../../../src/other/openNURBS -I../../../src/other/libz  -pipe -fno-strict-aliasing -fno-common -fexceptions -ggdb3 -D_FORTIFY_SOURCE=2 -pedantic -W -Wall -Wundef -Wfloat-equal -Wshadow -Winline -Wno-long-long -c -o uncompr.lo uncompr.c
    /bin/sh ../../../libtool --silent --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../../include   -DBRLCADBUILD=1 -I../../../include -I../../../src/other/openNURBS -I../../../src/other/libz  -pipe -fno-strict-aliasing -fno-common -fexceptions -ggdb3 -D_FORTIFY_SOURCE=2 -pedantic -W -Wall -Wundef -Wfloat-equal -Wshadow -Winline -Wno-long-long -c -o zutil.lo zutil.c
    zutil.c: In function `zcalloc':
    zutil.c:308: warning: visibility attribute not supported in this configuration; ignored
    zutil.c: In function `zcfree':
    zutil.c:316: warning: visibility attribute not supported in this configuration; ignored
    /bin/sh ../../../libtool --silent --tag=CC --mode=link gcc  -pipe -fno-strict-aliasing -fno-common -fexceptions -ggdb3 -D_FORTIFY_SOURCE=2 -pedantic -W -Wall -Wundef -Wfloat-equal -Wshadow -Winline -Wno-long-long  -pipe -fno-strict-aliasing -fno-common -fexceptions -ggdb3 -D_FORTIFY_SOURCE=2 -pedantic -W -Wall -Wundef -Wfloat-equal -Wshadow -Winline -Wno-long-long -o libz.la -rpath /export/home/alex/Downloads/brlcad-7.18.2/../targ/lib -version-info 2:4:1 adler32.lo compress.lo crc32.lo deflate.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo uncompr.lo zutil.lo  
    ld: fatal: relocation error: R_386_GOTOFF: file .libs/deflate.o: symbol zcalloc: a GOT relative relocation must reference a local symbol
    ld: fatal: relocation error: R_386_GOTOFF: file .libs/deflate.o: symbol zcfree: a GOT relative relocation must reference a local symbol
    ld: fatal: relocation error: R_386_GOTOFF: file .libs/deflate.o: symbol _length_code: a GOT relative relocation must reference a local symbol
    ld: fatal: relocation error: R_386_GOTOFF: file .libs/deflate.o: symbol _dist_code: a GOT relative relocation must reference a local symbol
    ld: fatal: relocation error: R_386_GOTOFF: file .libs/deflate.o: symbol _dist_code: a GOT relative relocation must reference a local symbol
    ld: fatal: relocation error: R_386_GOTOFF: file .libs/deflate.o: symbol _length_code: a GOT relative relocation must reference a local symbol
    ld: fatal: relocation error: R_386_GOTOFF: file .libs/deflate.o: symbol _dist_code: a GOT relative relocation must reference a local symbol
    ld: fatal: relocation error: R_386_GOTOFF: file .libs/deflate.o: symbol _dist_code: a GOT relative relocation must reference a local symbol
    ld: fatal: relocation error: R_386_GOTOFF: file .libs/deflate.o: symbol _length_code: a GOT relative relocation must reference a local symbol
    ld: fatal: relocation error: R_386_GOTOFF: file .libs/deflate.o: symbol _dist_code: a GOT relative relocation must reference a local symbol
    ld: fatal: relocation error: R_386_GOTOFF: file .libs/deflate.o: symbol _dist_code: a GOT relative relocation must reference a local symbol
    collect2: ld returned 1 exit status
    gmake[3]: *** [libz.la] Error 1
    gmake[3]: Leaving directory `/export/home/alex/Downloads/brlcad-7.18.2/src/other/libz'
    gmake[2]: *** [all-recursive] Error 1
    gmake[2]: Leaving directory `/export/home/alex/Downloads/brlcad-7.18.2/src/other'
    gmake[1]: *** [all-recursive] Error 1
    gmake[1]: Leaving directory `/export/home/alex/Downloads/brlcad-7.18.2/src'
    gmake: *** [all-recursive] Error 1
    alex@opensolaris:~/Downloads/brlcad-7.18.2$
    

    is there some package i am missing here…?

    I have the gcc as well as the gnu tools installed, i ran ./configure -prefix=…/… -enable-almost-everything -with-ogl

    and the result was

    Build Tcl ............................: yes
    Build Tk .............................: yes
    Build Itcl/Itk .......................: yes
    Build IWidgets .......................: yes
    Build tkhtml .........................: yes
    Build tkpng ..........................: 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
    X11 support (optional)................: yes
    OpenGL support (optional).............: yes
    librtserver JDK support (optional)....: no
    Enable run-time debugging (optional)..: yes
    Build 64-bit release .................: no (32-bit)
    Build optimized release ..............: no
    Build debug release ..................: auto
    Build profile release ................: no
    Build SMP-capable release ............: yes
    Build static libraries ...............: yes
    Build shared/dynamic libraries .......: yes
    Print verbose compilation warnings ...: yes
    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 ...........: 6 minutes, 47 seconds
    ---
    ./configure complete, type 'make' to begin building
    alex@opensolaris:~/Downloads/brlcad-7.18.2$ gmake
    

    but then this error popped out…

    What can i do…?

    BRGDS

    Alex

     
  • Sean Morrison

    Sean Morrison - 2011-03-04

    Alex,

    While related, you should generally start a new thread since your specific problem and configuration are not necessarily the same issue.  That said, try running autogen.sh before configure.  Install any missing components that autogen.sh lists as required (e.g., m4, perl, automake, autoconf, libtool) and then retry configure once it succeeds.

    That looks to be the main problem on your build, where the build products just aren't being assembled correctly.  Rebuild the configuration with autogen.sh, delete your cache files (rm -rf *cache*), rerun configure (with -enable-all), and see if it makes it any further.

    Cheers!
    Sean

     
  • Alex Per

    Alex Per - 2011-03-05

    Hi Sean

    Thanks for your reply :)

    I tried following your steps…

    First, bash would tell me that there was no Autoconf there…  it was right… there is an autoconf-1.10 so i created a symlink in /usr/bin called autoconf…  but now its stops, complaining there is no aclocal…

    I have tried to get this in my package manager, to no avail..  :(

    .su: Unknown id: ln
    alex@opensolaris:~/Downloads/brlcad-7.18.2$ su root
    Password: 
    alex@opensolaris:~/Downloads/brlcad-7.18.2# ln -s /usr/bin/automake-1.10 /usr/bin/automake
    alex@opensolaris:~/Downloads/brlcad-7.18.2# su alex
    alex@opensolaris:~/Downloads/brlcad-7.18.2$ ./autogen.sh
    Preparing the BRL-CAD build system...please wait
    Found GNU Autoconf version 2.61
    Found GNU Automake version 1.10
    Found GNU Libtool version 1.5.22
    Automatically preparing build ... Warning: autoreconf failed
    Attempting to run the preparation steps individually
    Preparing build ... ERROR: aclocal failed
    alex@opensolaris:~/Downloads/brlcad-7.18.2$
    

    What should i do next…?

    BRGDS

    Alex

     
  • Sean Morrison

    Sean Morrison - 2011-03-05

    Try running ./autogen.sh -verbose

    It looks like it's just not finding aclocal at all, so you have another symlink missing.  aclocal is part of automake so given you had /usr/bin/automake-1.10, I suspect you have a /usr/bin/aclocal-1.10

    You might want to review your /usr/bin directory for other *-1.10 binaries (automake-related) or other *-2.61 binaries (autoconf-related), etc.

    Cheers!
    Sean

     
  • Alex Per

    Alex Per - 2011-03-06

    Hi Sean

    Thks a lot… the symlink was the trick…  :)

    Now the build stops at adrt…

    Making all in adrt
    make[2]: Entering directory `/home/alex/Downloads/brlcad-7.16.2/src/adrt'
    /bin/sh ../../libtool --silent --tag=CC  --silent --mode=link gcc -I../../src/adrt -I../../src/adrt/libtie -I../../src/adrt/libcommon -I../../src/adrt/librender -I../../src/adrt/librender -I../../src/other/tcl/generic -I../../src/other/tcl/unix -pipe -fno-strict-aliasing -fno-common -fexceptions -g  -L/usr/X11/lib -pipe -fno-strict-aliasing -fno-common -fexceptions -g -o adrt_master compnet.o dispatcher.o tienet_master.o master.o libtie.la ../../src/libbu/libbu.la  -lthread -lc -lm ../../src/other/libz/libz.la 
    ld: warning: file ../../src/libbu/.libs/libbu.so: linked to /home/alex/Downloads/brlcad-7.16.2/src/libbu/.libs/libbu.so: attempted multiple inclusion of file
    ld: warning: file ../../src/other/libz/.libs/libz.so: linked to /home/alex/Downloads/brlcad-7.16.2/src/other/libz/.libs/libz.so: attempted multiple inclusion of file
    Undefined           first referenced
     symbol                 in file
    bind                                compnet.o  (symbol belongs to implicit dependency /lib/libsocket.so.1)
    accept                              tienet_master.o  (symbol belongs to implicit dependency /lib/libsocket.so.1)
    listen                              tienet_master.o  (symbol belongs to implicit dependency /lib/libsocket.so.1)
    gethostbyname                       compnet.o  (symbol belongs to implicit dependency /lib/libnsl.so.1)
    socket                              compnet.o  (symbol belongs to implicit dependency /lib/libsocket.so.1)
    connect                             compnet.o  (symbol belongs to implicit dependency /lib/libsocket.so.1)
    inet_ntoa                           tienet_master.o  (symbol belongs to implicit dependency /lib/libnsl.so.1)
    ld: fatal: symbol referencing errors. No output written to .libs/adrt_master
    collect2: ld returned 1 exit status
    make[2]: *** [adrt_master] Error 1
    make[2]: Leaving directory `/home/alex/Downloads/brlcad-7.16.2/src/adrt'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/alex/Downloads/brlcad-7.16.2/src'
    make: *** [all-recursive] Error 1
    

    is it some dependency i am missing…?

    …  i get the picture that some object files are not linking …  but using the gnu Build suite yelded a good result till now…

    What must i do now…?

    Thks for your attention  :)

    BRGDS

    Alex

     
  • Alex Per

    Alex Per - 2011-03-06

    I do not get to find no libnsl nor nsl in my package manager…

    wait… i got it :

    alex@solaris:~$ ls /lib | grep nsl
    libnsl.so
    libnsl.so.1
    llib-lnsl
    llib-lnsl.ln
    alex@solaris:~
    

    Still even after

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib 

    i get the sme mistake…

    … Im clueless here…  :(

     
  • Sean Morrison

    Sean Morrison - 2011-03-06

    It looks like it's not attempting to link those libraries, yet is smart enough to tell you which ones you need.

    For whatever reason, something didn't get detected during configure, but you can override and probably get past that specific error with this:

    make LIBS="-lsocket -lnsl"

     
  • Alex Per

    Alex Per - 2011-03-08

    Hi …

    I built the entire app, and installed it…

    Only when i launch mged, an error pops up :

    Can't find a usable tk.tcl in the following directories: 
        /usr/brlcad/lib/tk8.5
    /usr/brlcad/lib/tk8.5/tk.tcl: version conflict for package "Tk": have 8.5.7, need exactly 8.5.6
    version conflict for package "Tk": have 8.5.7, need exactly 8.5.6
        while executing
    "package require -exact Tk  8.5.6"
        (file "/usr/brlcad/lib/tk8.5/tk.tcl" line 20)
        invoked from within
    "source /usr/brlcad/lib/tk8.5/tk.tcl"
        ("uplevel" body line 1)
        invoked from within
    "uplevel #0 [list source $file]"
    This probably means that tk wasn't installed properly.
    MGED Aborted.
    

    nonetheless, i ran configure with -enable-all -disable-ogl

    Is this a problem of mged starting script…?

    Tcl and Tk libraries were compiled allright…   :(

     

Log in to post a comment.