[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-06-23 03:37:13
|
Bugs item #2962699, was opened at 2010-03-03 16:24 Message generated for change (Comment added) made by brlcad 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: Closed Resolution: Fixed >Priority: 6 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: Sean Morrison (brlcad) Date: 2010-06-23 03:37 Message: Fred, feel free to verify trunk compilation for any new/remaining warnings or errors. The ones you mention should now be fixed. For future reference, in leu of attaching the entire file you modify, SVN will produce a patch file automatically if you run "svn diff > file.patch" and the resulting patch file is considerably easier to review and apply. Thanks again for the report regardless. Cheers! ---------------------------------------------------------------------- Comment By: Sean Morrison (brlcad) Date: 2010-06-23 03:37 Message: This issue has been resolved in the latest (unreleased) version of the source code. Thank you for bringing the issue to our attention! You're welcome and encouraged to test and make sure this issue is resolved after the next source release of BRL-CAD. ---------------------------------------------------------------------- Comment By: Fred (breakfastfish) Date: 2010-04-15 13:32 Message: As of yesterday, I have built the source from svn successfully and ran benchmark and tests without problems. I did have to modify the attached files. Please forgive my poor coding and lack of diffs as I am not too good at that sort of thing. Thanks, Fred ---------------------------------------------------------------------- Comment By: Fred (breakfastfish) Date: 2010-04-09 23:05 Message: Well, Here's another one. Let me know if I need to be filing a different bug report for this: /bin/sh ../../libtool --silent --tag=CC --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../include -I/usr/local/include -I/usr/X11/include -DBRLCADBUILD=1 -I../../include -I../../src/other/openNURBS -pedantic -W -Wall -Werror -Wno-long-long -DIF_REMOTE -DIF_AB -DIF_X -DIF_TK -DIF_OGL -O2 -march=i486 -mtune=i686 -pipe -fno-strict-aliasing -fno-common -fexceptions -gstabs3 -D_FORTIFY_SOURCE=2 -O3 -MT libfb_la-fbserv_obj.lo -MD -MP -MF .deps/libfb_la-fbserv_obj.Tpo -c -o libfb_la-fbserv_obj.lo `test -f 'fbserv_obj.c' || echo './'`fbserv_obj.c /bin/sh ../../libtool --silent --tag=CC --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../include -I/usr/local/include -I/usr/X11/include -DBRLCADBUILD=1 -I../../include -I../../src/other/openNURBS -pedantic -W -Wall -Werror -Wno-long-long -DIF_REMOTE -DIF_AB -DIF_X -DIF_TK -DIF_OGL -O2 -march=i486 -mtune=i686 -pipe -fno-strict-aliasing -fno-common -fexceptions -gstabs3 -D_FORTIFY_SOURCE=2 -O3 -MT libfb_la-if_X.lo -MD -MP -MF .deps/libfb_la-if_X.Tpo -c -o libfb_la-if_X.lo `test -f 'if_X.c' || echo './'`if_X.c cc1: warnings being treated as errors if_X.c: In function 'X_wmap': if_X.c:1168: error: ignoring return value of 'write', declared with attribute warn_unused_result make[2]: *** [libfb_la-if_X.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... Everything else compiles without warnings or errors. Thanks, Fred ---------------------------------------------------------------------- Comment By: Sean Morrison (brlcad) Date: 2010-04-09 19:06 Message: Glad to hear it! Feel free to file more reports if you notice other problems. ---------------------------------------------------------------------- Comment By: Fred (breakfastfish) Date: 2010-04-09 18:52 Message: I'm building the source code now without problems where there were before. I think that I will also try compiling on a system with a fresh install of Slackware-13.0 and see what happens. It depends on how much time I have this weekend. Thanks for the fixes! Fred ---------------------------------------------------------------------- Comment By: Sean Morrison (brlcad) Date: 2010-04-09 17:05 Message: We will just have to hit these up one at a time as I'm unable to reproduce the problem here even with GCC 4.3.3 .. a change to nmg_pr.c has been applied. You actually caught a subtle (albeit minor) bug with that error. The change is applied to latest svn as r38410. Any more? ---------------------------------------------------------------------- Comment By: Fred (breakfastfish) Date: 2010-04-08 17: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 21: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 18: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 |