LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Installing gcc option "--disable-libunwind-exceptions" (https://www.linuxquestions.org/questions/solaris-opensolaris-20/installing-gcc-option-disable-libunwind-exceptions-4175444120/)

gaurav.rustagi 01-04-2013 05:19 AM

Installing gcc option "--disable-libunwind-exceptions"
 
Hi,

Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-52)

I could see this option in gcc configuration. Can anybody tell me the meaning of this option and why this has been disabled in gcc installation ? Is this a generic installation ?

Thanks,

knudfl 01-04-2013 06:19 AM

--disable-libunwind-exceptions : Means ..
Don't use libunwind, to avoid {undefined reference to `_Unwind_GetIPInfo'}.


The option is used in Fedora gcc's :
gcc 4.1.2 is the Fedora 6 gcc, also used the Fedora 6 based 'Redhat EL 5'.


.

gaurav.rustagi 01-04-2013 08:14 AM

Thanks for your reply.

This is one the problem with my gcc build on Solaris box. I think this option is enabled and it produces crashes when a native library throws an exception throw JNI. However, this behaviour is only visible on 64 bit build, where as on 32-bit it works perfectly fine.

The program fails during the dynamic linking of "_Unwind_RaiseException". Should I again built the gcc compiler with disabling this option "libunwind-exceptions" ? what is your suggestion ?

Thanks,

knudfl 01-04-2013 10:03 AM

Probably not a good idea to replace the default compiler.

Suggest : Use a configure line like ...
../gcc-4.1.2/configure --prefix=/usr/local/gcc41 --program-suffix=41 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-multilib --with-system-zlib --disable-libunwind-exceptions

Then link the new binaries gcc41, g++41 to /usr/bin/

And use with : export CC=gcc41 CXX=g++41


.

gaurav.rustagi 01-04-2013 12:08 PM

Thanks again,

We built the compiler again with '--disable-libunwind-exceptions' and still it crashes. Could it be related with Solaris libraries as the libc.so , i think, is provided by Solaris box ? Please correct me if I am wrong.

Have you ever faced this situation like getting these crashes in functions "Unwind_Raise_Exceptions" in system libraries ? Why this is happening only with 64-bit built libraries ? Could it be related with JDK version ? I will soon post the source code too so that if anyone has access to Solaris box can run the example on their own.

thanks,

knudfl 01-04-2013 01:41 PM

Suggest :
Use the 'Report' button to ask for the thread to be moved to the Solaris Forum.


I have used Solaris for a short time only, and cannot answer your question.
( Post # 1 indicates that it is no Solaris OS.)

Good luck !

colucix 01-07-2013 02:17 AM

Moved: This thread is more suitable in Solaris forum and has been moved accordingly to help your thread/question get the exposure it deserves.


All times are GMT -5. The time now is 06:03 PM.