[brlcad-tracker] [ brlcad-Bugs-2962699 ] build failure, nmg_class.c
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: SourceForge.net <no...@so...> - 2010-04-08 17:21:17
|
Bugs item #2962699, was opened at 2010-03-03 10:24 Message generated for change (Comment added) made by breakfastfish You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=640802&aid=2962699&group_id=105292 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Compilation Group: other bug / workaround Status: Open Resolution: Fixed Priority: 5 Private: No Submitted By: Fred (breakfastfish) Assigned to: Sean Morrison (brlcad) Summary: build failure, nmg_class.c Initial Comment: When compiling on Slackware-13.0 32bit with the configure options listed, the build fails with the following error: primitives/nmg/nmg_class.c: In function 'nmg_class_pt_s': primitives/nmg/nmg_class.c:710: error: array subscript is above array bounds primitives/nmg/nmg_class.c:710: error: array subscript is above array bounds primitives/nmg/nmg_class.c:710: error: array subscript is above array bounds make[2]: *** [nmg_class.lo] Error 1 Configure options are as follows: ./configure --enable-optimized --enable-unigraphics --prefix=/opt/BRL-Cad/ --with-ogl Configure produces the following summary: Build Tcl ............................: no (using system) Build Tk .............................: no (using system) Build Itcl/Itk .......................: yes Build IWidgets .......................: yes Build tkhtml3 ........................: yes Build tkImg ..........................: 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 Build jove ...........................: no X11 support (optional)................: yes OpenGL support (optional).............: yes librtserver JDK support (optional)....: yes Enable run-time debugging (optional)..: yes Build 64-bit release .................: no (32-bit) Build optimized release ..............: yes 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 ...: 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) JDK-6_U18 from Sun is installed as the JDK. This error occurs with SVN version as well as 7.16.6. If the following flags are given with make, the build succeeds but mged produces a segmentation fault when run. Also, the tests and benchmark fail. make CFLAGS="-O2 -march=i486 -mtune=i686" CXXFLAGS="-O2 -march=i486 -mtune=i686" ---------------------------------------------------------------------- >Comment By: Fred (breakfastfish) Date: 2010-04-08 12:21 Message: nmg_class.c works but this file does not: nmg_pr.c Now this file gives the same error: /bin/sh ../../libtool --silent --tag=CC --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../include -DOBJ_BREP=1 -I../../src/other/tnt -I../../src/other/openNURBS -I/usr/local/include -I/usr/X11/include -DBRLCADBUILD=1 -I../../include -I../../src/other/openNURBS -pedantic -W -Wall -Werror -Wno-long-long -O2 -march=i486 -mtune=i686 -pipe -fno-strict-aliasing -fno-common -fexceptions -ggdb3 -D_FORTIFY_SOURCE=2 -O3 -MT nmg_pr.lo -MD -MP -MF .deps/nmg_pr.Tpo -c -o nmg_pr.lo `test -f 'primitives/nmg/nmg_pr.c' || echo './'`primitives/nmg/nmg_pr.c cc1: warnings being treated as errors primitives/nmg/nmg_pr.c: In function 'nmg_pr_vua': primitives/nmg/nmg_pr.c:806: error: array subscript is above array bounds make[2]: *** [nmg_pr.lo] Error 1 make[2]: Leaving directory `/home/fred/extras/BRL-Cad/brlcad/src/librt' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/fred/extras/BRL-Cad/brlcad/src' make: *** [all-recursive] Error 1 I tried to look at your fix to nmg_class.c but I am not that experienced of a programmer so I was not able to replicate your fix on this file to try. ---------------------------------------------------------------------- Comment By: Fred (breakfastfish) Date: 2010-04-06 16:01 Message: First, thanks for the fix. I'll be trying it shortly. I'm using gcc shipped with Slackware 13.0 I've tried compiling this on another machine (dual amd64 with Slackware64-13.0) with the same results as originally posted. Here is the gcc version info from my installed compiler: gcc -v Reading specs from /usr/lib/gcc/i486-slackware-linux/4.3.3/specs Target: i486-slackware-linux Configured with: ../gcc-4.3.3/configure --prefix=/usr --libdir=/usr/lib --enable-shared --enable-bootstrap --enable-languages=ada,c,c++,fortran,java,objc --enable-threads=posix --enable-checking=release --with-system-zlib --disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp --with-gnu-ld --verbose --with-arch=i486 --target=i486-slackware-linux --build=i486-slackware-linux --host=i486-slackware-linux Thread model: posix gcc version 4.3.3 (GCC) ---------------------------------------------------------------------- Comment By: Sean Morrison (brlcad) Date: 2010-04-06 13:50 Message: Fred, a change to the code was made in our trunk sources that addresses this error. It's a curious error that I can't reproduce anywhere -- what compiler are you using? Regardless, r38347 has a change that should fix this so please test trunk or report if it works for you after the upcoming 7.16.8 release. Cheers! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=640802&aid=2962699&group_id=105292 |