-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SegFault: Linux, gcc-4.8.2 #514
Comments
Which version of OpenSCAD, which OS, and how did you install it? |
This works just fine on Win this OpenSCAD http://www.openscad.org version Sincerely, TakeItAndRun linear_extrude( height=10, twist=100, slices=25 ) { 2013/10/27 Patrick Bogen notifications@github.com
stempeldergeschichte@googlemail.com karsten@rohrbach.de P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist: P.S. In case my e-mail is shorter than you enjoy: Enjoy! |
It works on Mac as well, with the latest git. This issue could be environment-dependent (compiler, library versions etc. on your computer), or Linux-specific. I'll try to give it a spin in a VM. In the meantime, it would be interesting if you tested a few things:
|
I did a test compile on the master branch an Ubuntu 12.10 VM, and it worked fine there. |
Could you run |
I see you fixed that script. :)
|
Hm, tough one. Perhaps building a debug version would provide more info? ( |
As comparison, Ubuntu 12.10 32-bit with git f708f5e and the following libraries works fine.
|
@pdbogen Could it be related to 32- vs. 64-bit builds? Which variant did you build? |
Hmm. I just did qmake -> make -> run. I'm presuming it built 64-bit by default, since I'm on 64-bit. I'll check the other test case later this afternoon, and I'll also try pulling the Ubuntu libs down one by one and seeing if the I can pin the problem down to a specific lib. Marius Kintel notifications@github.com wrote:
Patrick Bogen |
I'm not sure how to generate 32-bit builds under Linux - it might be tricky since you need 32-bit build of all libraries. |
On Wed, Oct 30, 2013 at 02:16:16PM -0700, Marius Kintel wrote:
It's not too hard on Debian-based systems. Multiarch stuff is super friendly. But also, IMO, the wrong answer. :) I'm setting up an Ubuntu chroot now to see
Patrick Bogen . |
I'm am also getting this issue, both with building openscad from source and from the 06 release. I have tried both with the newest and also the libraries as downloaded by the script in the openscad source and get the same issue. I am running Arch Linux (x86_64). https://gist.github.com/benpye/df34110801da93d9d9b5 is the Library Info for the from master build with the libraries it downloaded. |
It also works for me on Debian 6.0.4 64-bit with the following libraries
|
is what I am running. |
Still produces the error, cannot test boost 1.49 as it is not compatible with newer versions of GCC. |
To rule out another issue, just build with clang 3.4 (trunk) and got the same seg fault, with the following libraries.
|
I had a similar issue (see #528) and solved it by updating eigen3 before recompiling everything(openscad/cgal/etc.). yaourt/the aur does not do this since the old version is within range and it is an optional dependency but with eigen3 version 3.2.0-1 the problem was solved for me. Just hoping this may help someone else. Make sure to rebuild cgal/openscad/etc. after updating eigen3... |
It might be that we're experiencing some issues with memory alignment using components from eigen and that updating eigen is an arbitrary way of mixing things up. It might also have been a bug in eigen. |
Updated Eigen on my end to 3.2.0 no change. |
i would be curious to see a comparison
another interesting experiment would be to build the tests, ( doc/testing.txt for instructions) then do this:
the cmake build system works differently than the qmake build system. in other words, the question is this - is your binary calling the same library versions it was compiled against? and is check_dependencies.sh just an awful piece of trash that i never should have written? |
I'll try building the tests a little later. On Fri, Nov 01, 2013 at 04:35:59PM -0700, donbright wrote:
Patrick Bogen . |
Step-by-step reproduction instructions from @benpye (verified by me in a VirtualBox VM):
|
I've gotten reports that this appears to be present when using gcc-4.8.2, but work well with both 4.8.1 and 4.7. I think the next step would be to get it to crash without OpenSCAD using a pure CGAL example. |
i just built dependencies and openscad with clang version 3.2-1~exp9ubuntu1 and there are no crashes. its definitely an issue with gcc 4.8.x im not sure about 4.8.1 vs 4.8.2, i built 32 bit mingw with 4.8.1 and it seems OK. will have to do more testing. gcc 4.8.2 has been disallowed with commit f175bae |
Please alter the code to use another gcc version if it exists as a temporary fix. My system has 4.7 present, but this commit means that the code can't compile at all on my system. |
There's no need for a code change as workaround (note there is no known code change that triggers the problem in the first place, it might even come from a library used). Normally distributions allow parallel install of both gcc 4.7 and 4.8 (confirmed to work on Debian, Ubuntu and Arch-Linux), so using
forces the OpenSCAD compile to use gcc-4.7 even if the latest one is the system default. For the test-cases use:
|
@t-paul I think @gringer would like it to detect the 4.7 install automatically and use that if available as per: brodykenrick@3b9b7e6 |
Maybe the warning could be added to provide the information about the problem and linking here. Updating the scripts for all systems to detect all possible cases and combinations might be a big task. That would probably need to handle MacOS and MinGW as well. Also some systems might even still have old gcc-4.6 use clang instead. So that's a big can of worms. |
Could this be related to this bug? http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58800 |
I was not thinking those changes would make it back up into the main branch I agree with @t-paul that all the effort of trying to do the auto-correct I think there is enough noise/chatter now of how to work around this issue On 9 December 2013 05:43, Giles Bathgate notifications@github.com wrote:
|
Doesn't work that way in Fedora. 4.8.2 is the only gcc in Fedora 19+. This shouldn't go to the new release, as it would mean the openscad package in Fedora would break. |
Again: This issue is a bug-report, not a code change. The issue also occurs with the currently released version when compiled with gcc-4.8.2, I think.
So "this shouldn't go in" is not really an existing option. There are only 2 options at this time. 1) compile with different gcc, 2) find and fix the bug (with the emphasis on find).
Any ideas how to track down and fix the bug are greatly appreciated. |
I meant this should be considered blocker for the next stable release and should be fixed properly before the release happen. I cannot reproduce the bug with 2013.06 compiled on 4.8.1, will try to recompile with 4.8.2 soon. |
So with 4.8.2 it also crashes on 2013.06 on Fedora.
|
I've modified /usr/include/c++/4.8/bits/stl_algo.h (on Debian jessie) and with that change, the crash is gone when compiling with 4.8.2. BUT: The patch seems to change only one occurrence of the problem, so it might not catch all cases :(. |
Ok, Debian ships a different file from what I'm seeing in the gcc svn repo. So all should be fine once the bugfix ends up in the distributions. |
So in Fedora, we are blocked by http://gcc.gnu.org/PR59470 and then we'll |
@hroncok Is the 59470 gcc issue related to 58800 somehow? |
@kintel No, it only blocks the update for being pushed, don't worry, sorry for not being clear enough. |
For reference, debian bug report http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732042 |
OK, fixed in Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1025072 |
Fix migrated to debian jessie/testing with libstdc++-4.8-dev (4.8.2-12). |
Fix confirmed for Arch Linux with gcc 4.8.2-8. |
Description from ambrop72: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58800 I have not been able to test this due to nix wanting to rebuild lots of things before building gcc. Patch was created with: svn diff -r 203872:203873 http://gcc.gnu.org/svn/gcc/branches This should fix a crash in OpenSCAD: openscad/openscad#514
Closing as gcc bug |
PPS: Compiles and runs without error for me... In file included from src/LibraryInfo.cc:8:0: src/version_check.h:118:2: warning: #warning "gcc 4.8.2 contains a bug causing a crash in CGAL." [-Wcpp] #warning "gcc 4.8.2 contains a bug causing a crash in CGAL." ^ Also had to manually install libqscintilla2-dev ii libqscintilla2-dev 2.8.1-2ubuntu1 all Scintilla source code editing widget for Qt4, development files depname minimum found OKness qt 4.4 5.2.1 OK qscintilla2 2.7 2.8.1 OK cgal 3.6 4.2 OK gmp 5.0 5.1.3 OK mpfr 3.0 3.1.2 OK boost 1.35 1.54 OK opencsg 1.3.2 1.3.2 OK glew 1.5.4 1.7.0 OK eigen 3.0 3.2.0 OK glib2 2.0 2.40.2 OK fontconfig 2.10 2.11. OK freetype2 2.4 17.1.11 OK harfbuzz 0.9.19 0.9.27 OK gcc 4.2 4.8.2 OK bison 2.4 3.0.2 OK flex 2.5.35 2.5.35 OK make 3 3.81 OK PPPS: Check dependencies is definitely not a piece of trash. It may not cover everything, but more info is better than less. :) |
Summary:
Test case:
Crash occurs on "Compile and Render (CGAL)", i.e., F6. Backtrace from gdb:
The text was updated successfully, but these errors were encountered: