Author Topic: Building 32b linux on 64b Linux  (Read 6460 times)

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Building 32b linux on 64b Linux
« on: 2010 August 28 18:47:41 »

Hi,

I got Fedora 13 working fine under Virtualbox. Guest additions work almost all the way, I can work in native monitor resolution and I can mount my NAS shares as samba shares. I can access my NAS cvsroot so I can edit my sources. Got g++ installed (gcc 4.4 was already there but g++ was not and was able to modify the linux makefiles to work in my environment. The 64b build of my module worked fine and PI happily loaded the module. The 32b install did not work though:

[sander@hercules-fedora g++]$ make
make -f ./makefile-x86 --no-print-directory
mkdir -p "/home/sander/Desktop/Profile/linux/g++/x86/Release"
g++ -m32 -Wl,-O1 -shared -L"/home/sander/pcl32/lib/x86" -L"/home/sander/pcl32/bin" -o "/home/sander/Desktop/Profile/linux/g++/x86/Release"/Profile-pxm.so ./x86/Release/ProfileInstance.o ./x86/Release/ProfileInterface.o ./x86/Release/ProfileModule.o ./x86/Release/ProfileParameters.o ./x86/Release/ProfileProcess.o -lpthread -lPCL-pxi
/usr/bin/ld: crti.o: No such file: No such file or directory
collect2: ld returned 1 exit status
make[1]: *** ["/home/sander/Desktop/Profile/linux/g++/x86/Release"/Profile-pxm.so] Error 1
make: *** [all] Error 2
[sander@hercules-fedora g++]$ ls /home/sander/pcl32/lib/x86
libPCL-pxi.a
[sander@hercules-fedora g++]$

As you can see I have pcl64 installed under $HOME/pcl and pcl32 under home/pcl32. Environment vars seem to be fine judging by the messages above. So it seems I need a 32b runtime library to link my module. I was able to make some progress by installing these:

   71  yum install gcc-c++ make
   73  yum install glibc-devel.i386
   75  yum install glibc.i686
   76  yum install glibc-devel.i686


The errors are now reduced to:

[sander@hercules-fedora g++]$ make -f makefile-x86
mkdir -p "/home/sander/Desktop/Profile/linux/g++/x86/Release"
g++ -m32 -Wl,-O1 -shared -L"/home/sander/pcl32/lib/x86" -L"/home/sander/pcl32/bin" -o "/home/sander/Desktop/Profile/linux/g++/x86/Release"/Profile-pxm.so ./x86/Release/ProfileInstance.o ./x86/Release/ProfileInterface.o ./x86/Release/ProfileModule.o ./x86/Release/ProfileParameters.o ./x86/Release/ProfileProcess.o -lpthread -lPCL-pxi
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.4/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.4/libstdc++.a when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.4/libstdc++.so when searching for -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.4/libstdc++.a when searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
make: *** ["/home/sander/Desktop/Profile/linux/g++/x86/Release"/Profile-pxm.so] Error 1
[sander@hercules-fedora g++]$

Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Building 32b linux on 64b Linux
« Reply #1 on: 2010 August 29 04:30:39 »
This should do the trick:

yum install libstdc++.i686

BTW, avoid .i386 packages. All 32-bit packages are now .i686 as of Fedora 12/13 AFAIK.

yum has a very nice feature with the 'provides' argument. For example:

yum provides libstdc++

tells you which packages provide the required library.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Building 32b linux on 64b Linux
« Reply #2 on: 2010 August 29 07:34:46 »
Thanks Juan, that did the trick.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity