Re: Problem compiling ROOT v5-33-02b

From: Chris Jones <jonesc_at_hep.phy.cam.ac.uk>
Date: Tue, 15 May 2012 13:58:35 +0100


On 15/05/12 13:50, Chiara Zampolli wrote:
> Hello Chris,
>
>
> On May 15, 2012, at 2:45 PM, Chris Jones wrote:
>
>> On 15/05/12 13:26, Chiara Zampolli wrote:
>>> Hi Chris,
>>>
>>> I started using MacPorts ~1 year and a half ago, since I had problems using only the system libraries, and it was suggested to me by the ROOT team to use Macports. My LD_LIBRARY_PATH is:
>>>
>>> Chiara_at_pb-d-128-141-34-143~/SOFT/ROOT/v5-33-02b$ echo $LD_LIBRARY_PATH
>>> /Users/Chiara/SOFT/alien/alien_04032012/api/lib:/Users/Chiara/SOFT/ROOT/v5-33-02b/lib:/usr/local/lib:/Users/Chiara/SOFT/ROOT/v5-33-02b/lib:
>>>
>>> so nothing from Macports. So, where exactly am I mixing them?
>>
>> you can see this in the build line you first posted.
>>
>> g++ -dynamiclib -single_module -Wl,-dead_strip_dylibs -install_name @rpath/libASImage.so -O2 -m64 -mmacosx-version-min=10.6 -o lib/libASImage.so graf2d/asimage/src/TASImage.o graf2d/asimage/src/TASPluginGS.o graf2d/asimage/src/G__ASImage.o -ldl -Llib -lGraf -lMathCore lib/libAfterImage.a -L/opt/local/lib -lfreetype -lz -L/usr/X11/lib -lpng -lz -L/usr/X11R6/lib -lXpm -L/usr/X11R6/lib -lXext -lX11 -Llib -lCore -lCint
>>
>> It is the -L/opt/local/lib - That is the 'macports area' so you are, whether you intended to or not, taking binaries from there.
>
> Yes, you are right. In fact I had noticed it myself.
>
>> If you are going to use this area, you need to properly configure the build to know it is using /opt/local
>>
>> What ./configure command do you run, and what output do you get ?
>>
>
> The configure file is the one that comes with root, I am anyway attaching it. I re-attach also the file I use to run the configure script (where other settings are defined).

I suggest you take a look at all the options available (run ./configure --help). I suspect you need to add better customisations for the various libraries you are trying to use.

Chris

>
> Anyway, I agree that there is a conflict between libraries, since on another Snow Leopard machine where I had never installed fink, everything works, v5-33-02b can be compiled, and the tiff library (for example) is in /opt/local/lib, as on the macBook where I have problems, i.e.:
>
> Chiara_at_pb-d-128-141-34-143~/SOFT/ROOT/v5-33-02b$ ls /opt/local/lib/*tiff*
> /opt/local/lib/libtiff.3.dylib /opt/local/lib/libtiff.dylib /opt/local/lib/libtiffxx.3.dylib /opt/local/lib/libtiffxx.dylib
> /opt/local/lib/libtiff.a /opt/local/lib/libtiff.la /opt/local/lib/libtiffxx.a /opt/local/lib/libtiffxx.la
>
> Thanks,
>
> Chiara
>
>
>
>
>
>> Chris
>>
>>
>> And, sorry for my ignorance, but which Portfile are you referring to?
>>> Moreover, up to this ROOT version, everything was working just fine.
>>>
>>> Thanks, and cheers,
>>>
>>> Chiara
>>>
>>>
>>> On May 15, 2012, at 2:18 PM, Chris Jones wrote:
>>>
>>>> On 15/05/12 13:10, Chiara Zampolli wrote:
>>>>> Ciao Chris,
>>>>>
>>>>> I am already installing ROOT outside Macports - if I understand what you mean at least. I am simply taking ROOT from svn, and then build it.
>>>>
>>>> yes,I know you are building from SVN, outside MacPorts. Your problem is you are then using an incompatible mix of libraries, some from macPorts and some not. This is your problem. If you want to use macports libraires, you need to make sure when you configure root everything is consistent with all the various options. The macports build does this for you. Checkout the Portfile for it if you want to see how.
>>>>
>>>> ... or, don't use anything from macports and rely only on the system libraries.
>>>>
>>>> Chris
>>>>
>>>>
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Chiara
>>>>>
>>>>>
>>>>>
>>>>> On May 15, 2012, at 1:03 PM, Chris Jones wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Your issue is you are mixing up MacPorts libraries with non-MacPorts ones. This is causing version conflicts etc.
>>>>>>
>>>>>> You need to go fully one way or the other, either fully use MacPorts, so install the MacPorts root version, which works just fine. This isn't v5-33-02b but the v5.32.02 - Is this not new enough ?
>>>>>>
>>>>>> Or... Build root yourself outside Macports, but don't take anything from /opt/local/lib
>>>>>>
>>>>>> Chris
>>>>>>
>>>>>>
>>>>>> On 15/05/12 09:25, Chiara Zampolli wrote:
>>>>>>> Dear all,
>>>>>>>
>>>>>>> I have a problem compiling ROOT v5-33-02b (on a MACOSx, Snow Leopard). Apparently the libtiff.so and libjpeg.so are not there:
>>>>>>>
>>>>>>> ==> lib/libMemStat.so done
>>>>>>> g++ -dynamiclib -single_module -Wl,-dead_strip_dylibs -install_name @rpath/libASImage.so -O2 -m64 -mmacosx-version-min=10.6 -o lib/libASImage.so graf2d/asimage/src/TASImage.o graf2d/asimage/src/TASPluginGS.o graf2d/asimage/src/G__ASImage.o -ldl -Llib -lGraf -lMathCore lib/libAfterImage.a -L/opt/local/lib -lfreetype -lz -L/usr/X11/lib -lpng -lz -L/usr/X11R6/lib -lXpm -L/usr/X11R6/lib -lXext -lX11 -Llib -lCore -lCint
>>>>>>> Undefined symbols:
>>>>>>> "_jpeg_read_header", referenced from:
>>>>>>> _jpeg2ASImage in libAfterImage.a(import.o)
>>>>>>> "_jpeg_stdio_dest", referenced from:
>>>>>>> _ASImage2jpeg in libAfterImage.a(export.o)
>>>>>>> "_jpeg_set_defaults", referenced from:
>>>>>>> _ASImage2jpeg in libAfterImage.a(export.o)
>>>>>>> "_jpeg_start_decompress", referenced from:
>>>>>>> _jpeg2ASImage in libAfterImage.a(import.o)
>>>>>>> "_jpeg_destroy_decompress", referenced from:
>>>>>>> _jpeg2ASImage in libAfterImage.a(import.o)
>>>>>>> _jpeg2ASImage in libAfterImage.a(import.o)
>>>>>>> "_jpeg_stdio_src", referenced from:
>>>>>>> _jpeg2ASImage in libAfterImage.a(import.o)
>>>>>>> "_jpeg_CreateCompress", referenced from:
>>>>>>> _ASImage2jpeg in libAfterImage.a(export.o)
>>>>>>> "_jpeg_abort_decompress", referenced from:
>>>>>>> _jpeg2ASImage in libAfterImage.a(import.o)
>>>>>>> "_jpeg_finish_compress", referenced from:
>>>>>>> _ASImage2jpeg in libAfterImage.a(export.o)
>>>>>>> "_jpeg_set_quality", referenced from:
>>>>>>> _ASImage2jpeg in libAfterImage.a(export.o)
>>>>>>> "_jpeg_finish_decompress", referenced from:
>>>>>>> _jpeg2ASImage in libAfterImage.a(import.o)
>>>>>>> "_jpeg_CreateDecompress", referenced from:
>>>>>>> _jpeg2ASImage in libAfterImage.a(import.o)
>>>>>>> "_jpeg_read_scanlines", referenced from:
>>>>>>> _jpeg2ASImage in libAfterImage.a(import.o)
>>>>>>> "_jpeg_start_compress", referenced from:
>>>>>>> _ASImage2jpeg in libAfterImage.a(export.o)
>>>>>>> "_jpeg_destroy_compress", referenced from:
>>>>>>> _ASImage2jpeg in libAfterImage.a(export.o)
>>>>>>> "_jpeg_write_scanlines", referenced from:
>>>>>>> _ASImage2jpeg in libAfterImage.a(export.o)
>>>>>>> _ASImage2jpeg in libAfterImage.a(export.o)
>>>>>>> "_jpeg_std_error", referenced from:
>>>>>>> _ASImage2jpeg in libAfterImage.a(export.o)
>>>>>>> _jpeg2ASImage in libAfterImage.a(import.o)
>>>>>>> ld: symbol(s) not found
>>>>>>> collect2: ld returned 1 exit status
>>>>>>> make: *** [lib/libASImage.so] Error 1
>>>>>>> Chiara_at_pb-d-128-141-34-143~/SOFT/ROOT/v5-33-02b$
>>>>>>>
>>>>>>> and the compilation does not work. In fact, when I configure ROOT with the script attached, I get:
>>>>>>>
>>>>>>> Checking for libjpeg ... no
>>>>>>> Checking for libtiff … no
>>>>>>>
>>>>>>> I tried to install them with MacPorts, and it seems it worked:
>>>>>>>
>>>>>>> Chiara_at_pb-d-128-141-34-143~/SOFT/ROOT/v5-33-02b$ port -v installed tiff
>>>>>>> Warning: port definitions are more than two weeks old, consider using selfupdate
>>>>>>> The following ports are currently installed:
>>>>>>> tiff @3.9.4_0 platform='darwin 10' archs='x86_64'
>>>>>>> tiff @3.9.5_0 (active) platform='darwin 10' archs='x86_64'
>>>>>>> Chiara_at_pb-d-128-141-34-143~/SOFT/ROOT/v5-33-02b$ port -v installed jpeg
>>>>>>> Warning: port definitions are more than two weeks old, consider using selfupdate
>>>>>>> The following ports are currently installed:
>>>>>>> jpeg @8b_0 platform='darwin 10' archs='x86_64'
>>>>>>> jpeg @8c_0 (active) platform='darwin 10' archs='x86_64'
>>>>>>> Chiara_at_pb-d-128-141-34-143~/SOFT/ROOT/v5-33-02b$
>>>>>>>
>>>>>>> but the configuration of root does not see libjpeg and libtiff yet. Any suggestion about what I could do? Should I use Fink?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thanks, and Regards,
>>>>>>>
>>>>>>> Chiara
>>>>>>
>>>>>
>>>>
>>>
>>
>
Received on Tue May 15 2012 - 14:58:42 CEST

This archive was generated by hypermail 2.2.0 : Tue May 15 2012 - 17:50:01 CEST