Dear Axel,
many thanks for the explanation!
On 01/24/2012 10:52 AM, Axel Naumann wrote:
> The work-around is to load the library that defines
> TestClass::DoSomething() before ACLiC-ing test3.C.
I would do that, if it wouldn't be for the "long standing issue of ACliC
linking all previously created shared libs even when not needed".
It seems, that this was only resolved for MacOS X but not for Linux,
quoting the release note:
"MacOS X: Shared libs are also linked with the option
"-Wl,-dead_strip_dylibs" which tells the linker to remove any shared lib
which is not used to resolve any symbols (this should solve the long
standing issue of ACliC linking all previously created shared libs even
when not needed)."
http://root.cern.ch/root/html532/notes/release-notes.html
Cheers,
Thiemo
> Thiemo Nagel wrote on 01/24/2012 10:01 AM:
>> Dear ROOTers,
>>
>> trying out ROOT v5.32, I've come across an inconsistency in
>> TSystem::CompileMacro() w.r.t. v5.30.
>>
>> Take the following code (test3.C):
>>
>> class TestClass {
>> public:
>> void DoSomething();
>> };
>>
>> void test3() {
>> TestClass a;
>> a.DoSomething();
>> }
>>
>> With v5.30/03, this compiles nicely (no linking is done):
>>
>> root [1] gSystem->CompileMacro( "test3.C", "C" )
>> (int)1
>>
>> But on 5.32 (svn-v5-32-00-patches, r42668), compilation fails at the
>> linking stage. Of course, linking must fail because DoSomething() is
>> not defined, but the old behaviour of CompileMacro() was to not even
>> attempt to link when "c" is specified.
>>
>> [1] themis:~/computing> root
>> root [0] gSystem->CompileMacro( "test3.C", "c" )
>> Info in<TUnixSystem::ACLiC>: creating shared library
>> /nfs/hicran/home/tnagel/private/computing/test3_C.so
>> /nfs/hicran/home/tnagel/private/computing/test3_C_ACLiC_dict.o: In
>> function `G__test3_C_ACLiC_dict_3018_0_1(G__value*, char const*,
>> G__param*, int)':
>> test3_C_ACLiC_dict.cxx:(.text+0xa2b): undefined reference to
>> `TestClass::DoSomething()'
>> /nfs/hicran/home/tnagel/private/computing/test3_C_ACLiC_dict.o: In
>> function `test3()':
>> test3_C_ACLiC_dict.cxx:(.text+0xa69): undefined reference to
>> `TestClass::DoSomething()'
>> collect2: ld returned 1 exit status
>> Error in<ACLiC>: Compilation failed!
>> (int)0
>>
>> Bottom line: Is this change in behaviour intended? In the release
>> notes, I haven't found anything about it (and it breaks my code).
>>
>> Cheers!
>> Thiemo
>>
--
+-----------------------------------+--------------------------+
| Dipl.-Phys. Thiemo Nagel | |
| Technische Universitaet Muenchen | Room PH1 3276 |
| Physik-Department E18 | |
| James-Franck-Strasse | Phone +49 89 289-12379 |
| D-85747 Garching | Fax +49 89 289-12570 |
+-----------------------------------+--------------------------+
Received on Tue Jan 24 2012 - 12:25:20 CET