SuperNEMO-DBD / homebrew-cadfael

Instructions on using/installing the SuperNEMO Software are now at: https://github.com/SuperNEMO-DBD/brew
MIT License
2 stars 1 forks source link

ROOT 5.34.30 fails to compile #4

Closed xgarrido closed 8 years ago

xgarrido commented 8 years ago

Compilation of ROOT version 5.34.30 fails due to this very early error

/lib/../lib64/libSM.so: référence indéfinie vers « uuid_unparse_lower@UUID_1.0 »
/lib/../lib64/libSM.so: référence indéfinie vers « uuid_generate@UUID_1.0 »
collect2: error: ld returned 1 exit status

I have googled it and have not find anything really interesting.

drbenmorgan commented 8 years ago

Do you have wget or uuid installed through brew, i.e. in the output of

$ brew ls

If so, just do

$ brew rm wget libuuid

This is an issue with the current gcc build - the gcc build needs wget but that requires libuuid, and that can conflict with the system version on certain Linuxes. I need to find a better way to do the gcc build but the above should fix the ROOT build.

xgarrido commented 8 years ago

I had wget so I did brew rm wget libuuid but the problem still remains.

drbenmorgan commented 8 years ago

Which libSM.so is being picked up? What does ldd <pathtothat>/libSM.so report - I'm interested in exactly which SM lib and liquid are being picked up. Try that both in a raw session, and try:

$ brew install --interactive root5
... it'll open a shell in the build environment for root5...
$ ldd <pathtothat>/libSM.so

If that doesn't reveal anything, see here for instructions on creating a gist log and attach that to this issue.

The only other thing I can think of is that something else in the brew area linked to the liduuid brew install. Could be worth doing a grep on the ldd output of all libs in the install area for anything that links to it.

xgarrido commented 8 years ago

The libSM.so that seems to be picked is the one in /lib/../lib64/libSM.so that refers to libSM.so.6.0.1 from /usr/lib/ directory. The result of the ldd command is the following one

$ ldd /lib/../lib64/libSM.so 
    linux-vdso.so.1 (0x00007fffe878d000)
    libICE.so.6 => /usr/lib/libICE.so.6 (0x00007f1b967a3000)
    libuuid.so.1 => /usr/lib/libuuid.so.1 (0x00007f1b9659e000)
    libc.so.6 => /usr/lib/libc.so.6 (0x00007f1b961fa000)
    /usr/lib64/ld-linux-x86-64.so.2 (0x0000564006997000)

in both sessions, raw and interactive one.

I also post the gist and did a grep for uuid within lib directory of brew and do not see anything related to this library.

drbenmorgan commented 8 years ago

The gist for the root5 formulae install is needed, i.e.

$ brew install root5 --c++11 
...
$ brew gist-logs root5

The cadfael formulae is only a thin dependency wrapper so doesn't keep logs of dependent builds.

xgarrido commented 8 years ago

I think I catch the problem. When I did brew install root5 --c++11, I did not get any trouble and the installation went fine until the end.

What I was doing previously was to remove wget and libuuid but I was replaying the "scene" by running brew install -v cadfael --c++11 that was trying to install root5 but before all, reinstalling wget and libuuid !

==> Installing cadfael from supernemo-dbd/homebrew-cadfael
==> Installing dependencies for supernemo-dbd/cadfael/cadfael: libuuid, wget, supernemo-dbd/cadfael/root5

Maybe I didn't understand your first message and I didn't realize that cadfael itself reinstalls wget and libuuid.

drbenmorgan commented 8 years ago

That's strange as the wget (and hence libuuid) dependency is a build time only one for gcc49. In other words, I wouldn't expect it to be triggered if gcc49 is already installed.

Anyway, I've patched the gcc contrib script that uses wget to use curl instead. This requires further testing to check whether system curl can be relied on - however, if you do

$ brew rm gcc49 wget libuuid
$ brew update
$ brew install cadfael --c++11

it should resolve, though note that this will reinstall gcc49 (I bumped the revision to ensure this is passed as an update).

xgarrido commented 8 years ago

wget and libuuid are now removed from cadfael dependency and everything goes well. Two last remarks :

  1. Even if I remove/unlink gcc49, wget and libuuid, I also have to remove cadfael in order to redo the installation process. It seems brew does not detect neither when links are removed nor when brew update a formula
  2. root 5.34.30 uses a lot of I/O process during the compilation and basically freezes my computer during almost 15 minutes