On Wed, 18 Feb 2009, Mark Taylor wrote:
> On Wed, 28 Jan 2009, Peter W. Draper wrote:
>
>> On Tue, 27 Jan 2009, Peter W. Draper wrote:
>>
>>> On Tue, 27 Jan 2009, Mark Taylor wrote:
>>>
>>>> I don't suppose anybody knows a straightforward way to build a 32-bit
>>>> starlink set from source on a 64-bit Linux? I had a go setting
>>>> CFLAGS=-m32 FFLAGS=-m32, but not very surprisingly this unsophisticated
>>>> approach got bogged down early (during make configure-deps on tclsys -
>>>> was looking only in /usr/X11R6/lib64/ not /usr/X11R6/lib/ for -lX11).
>>>>
>>>> I expect that getting this working is one of those things that ought
>>>> to be straightforward but in fact takes weeks of inching further through
>>>> the build until it all works. I do *not* want to get involved
>>>> in that sort of thing! But if anyone has a *simple* recipe that they've
>>>> tried, or that they'd expect to work, I'd be grateful to hear.
>>>
>>> Last time I tried this I used:
>>>
>>> # 32bit build.
>>> setenv CFLAGS -m32
>>> setenv CXXFLAGS -m32
>>> setenv FCFLAGS -m32
>>>
>>> # Pick up 32bit X11
>>> setenv LDFLAGS "-L/usr/X11R6/lib"
>
> This very nearly works, except for a single file in applications/gaia/gaia3d.
> The following line, generated by the make, fails:
>
> g++ -m32 -m32 -shared -o libgaia3d4.3.0.so Gaia3d.o Gaia3dVtkTcl.o Grf3dVtk.o vtkAst Transform.o -L/data/andromeda1/stargit/starlink/thirdparty/eso/skycat/skycat/skycat -lskycat3.0.1 -L/data/andromeda1/stargit/starlink/thirdparty/eso/skycat/skycat/cat -lcat4.0 -L/data/andromeda1/stargit/starlink/thirdparty/eso/skycat/skycat/rtd -lrtd3.0 -L/data/andromeda1/stargit/starlink/thirdparty/eso/skycat/skycat/astrotcl -lastrotcl2.0 -L/data/andromeda1/stargit/starlink/thirdparty/eso/skycat/skycat/tclutil -ltclutil2.0 -L/mbt/starauto32/lib -lBLT24 -L/usr/X11R6/lib64 -lX11 -L/mbt/starauto32/lib -ltcl8.4 -L/mbt/starauto32/lib -ltk8.4
> /usr/bin/ld: skipping incompatible /usr/X11R6/lib64/libX11.so when searching for -lX11
> /usr/bin/ld: skipping incompatible /usr/X11R6/lib64/libX11.a when searching for -lX11
> /usr/bin/ld: cannot find -lX11
> collect2: ld returned 1 exit status
> make[2]: *** [libgaia3d4.3.0.so] Error 1
>
> If I execute this from the command line with "-L/usr/X11R6/lib" substituted
> for "-L/usr/X11R6/lib64" it builds, and the rest of the make world goes
> off OK.
>
> This suggests to me that the configure magic is slightly wrong within
> GAIA (i.e. it's losing the LDFLAGS in one place). You might want to
> take a look. Since I don't require a 32-bit gaia however, this is
> not critical from my point of view.
Strange that this just worked for me, seems the library path is supplied
by just adding -m32 to the compiler.
Anyway, I've fixed GAIA so it should pick up the LDFLAGS value now.
Cheers,
Peter.
|