Author Topic: [1.8RC1] Compiling modules with default gcc fails  (Read 3483 times)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
[1.8RC1] Compiling modules with default gcc fails
« on: 2012 December 28 14:17:08 »
Using the default gcc 4.7.2 on Fedora 17 to compile modules crashes PI with SIGSEGV (11) when trying to install the module. ddd does not reveal the root cause. Compiling with gcc 4.6.3 works fine.
(In a previous version, gcc4.7.2 failed when linking modules. The current behaviour in my opionion is worse.)

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: [1.8RC1] Compiling modules with default gcc fails
« Reply #1 on: 2012 December 29 03:01:59 »
That is very strange, since the whole PI platform is being compiled and linked with GCC 4.7.2 on Linux and FreeBSD without problems.

Are you sure that...

- You have all the necessary environment variables well defined (and pointing where they should point).

- You are working with the latest PCL 2.0 available:
http://pixinsight.com/developer/pcl/download/

- Just for sanity (although should not be necessary in theory), have you regenerated all makefiles for your module.

Finally, a word of caution. If you compile and link on Fedora 17, other users working with older distributions (such as Fedora 16, for example), will have problems with your module due to incompatibilities between libc versions. If you release your module as open source this is a minor problem, though, since they can always recompile it, now that PCL is open source too.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: [1.8RC1] Compiling modules with default gcc fails
« Reply #2 on: 2012 December 29 04:31:49 »
Juan,
- I am setting all environment variables using a script. I am setting them as follows:
$ env|grep PCL
PCLBINDIR32=.
PCLDIR=/home/georg/PCL_2.0
PCLLIBDIR64=/home/georg/PCL_2.0/lib/linux/x86_64
PCLSRCDIR=/home/georg/PCL_2.0/src
PCLLIBDIR=/home/georg/PCL_2.0/lib/linux/x86_64
PCLBINDIR=/home/georg/PCL_2.0/bin
PCLLIBDIR32=.
PCLBINDIR64=/home/georg/PCL_2.0/bin
PCLINCDIR=/home/georg/PCL_2.0/include
$ env|grep PI
PIDIR64=/home/georg/PixInsight1.8RC1
PIDIR32=.
PIDIR=/home/georg/PixInsight1.8RC1

- I am working with PCL2.0 as provided earlier this week. API version of the built module is 137 (which is also what other modules included with PI1.8RC1 display). Also CodeEditor is known to this PCL version, and I dont think it was in any of the earlier versions that I had.

- I did not regenerate makefiles. I am building on eclipse, and I am using the recipe for eclipse configuration provided by Carlos. I double checked that eclipse is picking up the environment variable settings.

- I have seen subtle differences between Suse and Redhat - even with the same compiler version - in my professional live. I am not sure what the differences between Fedora17 and FreeBSD are.

I would never have tried gcc4.6.3 if there had not been the link issue on one of your earlier pre-releases. My guess is that the problem is somehow related to what we saw there.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: [1.8RC1] Compiling modules with default gcc fails
« Reply #3 on: 2013 January 10 11:04:29 »
Same cause as in http://pixinsight.com/forum/index.php?topic=5019.msg34894#msg34894. Somehow "-fvisibility=hidden" was missing in my makefiles (which I thought I had generated with the PI tools).

Sorry for this false alarm  :embarassed:.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)