UUID library not found

Dear all,
I am trying to install O2 on my mac (Catalina, v10.15.3, latest alidist) and encountered the following problem when compiling XRootD v4.11.1:

[ 83%] Linking CXX shared library libXrdCl.dylib
ld: library not found for -luuid
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I would be very greatful for any hints or suggestions.

Cheers,
Mario

@bvonhall could you add Nikola Hardi to discourse so that I can ask him to reply?

@nhardi is in the place !

@mkruger very similar issue was fixed sometimes in November [1] [2] and XRootD 4.11.1 should include that fix. On macOS XRootD will use only the system UUID library which is header only and doesn’t need linking.

Could you share the full XRootD build log?

By the way, XRootD 4.11.2 was just released a few days ago and it includes some fixes that we need. I haven’t tested it yet, but you could give it a try.

[1] https://github.com/xrootd/xrootd/pull/1082
[2] https://github.com/xrootd/xrootd/pull/1119

Hi @nhardi,
thanks a lot for you help.
You can find the full log here: https://cernbox.cern.ch/index.php/s/YqB9s9Fg7Dmi6Wc.
I will try to rebuild with version 4.11.2 and let you know if that fixes it.
Cheers,
Mario

From the build log, it looks like it’s pkg-config that picked up libuuid. I suspect it’s from brew. Do you maybe have libuuid installed from brew? That could confuse XRootD build scripts. Could you try removing brew libuuid?

Cheers,
Nikola

Yes apparently I have a uuid version installed with brew. Seems like this is required by my python installation:

brew uninstall ossp-uuid

Error: Refusing to uninstall /usr/local/Cellar/ossp-uuid/1.6.2_2
because it is required by python, which is currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies ossp-uuid

If I do that, it will break my python installation, right?

Yes, most probably it will break things, don’t do it. I need to check a few things, something is strange.

@mkruger on my machine python doesn’t seem to depend on ossp-uuid. Which exactly brew python do you have?

@nhardi I have as ‘default’ python (placed in /usr/bin/local/)
python -> …/Cellar/python@2/2.7.17_1/bin/python
and one unlinked version of python3
/usr/local/Cellar/python/3.7.6_1/

There are also non-brew installations of python on my system placed in
in /usr/bin/
python -> …/…/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
python3

brew deps --tree --installed | grep -A 20 -B 10 ‘^python$’
also shows no dependency on uuid for me

python
├── gdbm
├── openssl@1.1
├── readline
├── sqlite
│ └── readline
└── xz

python@2
├── gdbm
├── openssl@1.1
├── readline
└── sqlite
└── readline

Here is how it looks like on my machine.

nhardi@nhardi-mbp ~/alice> brew install python
Warning: python 3.7.6_1 is already installed and up-to-date
To reinstall 3.7.6_1, run `brew reinstall python`
nhardi@nhardi-mbp ~/alice> brew install ossp-uuid
==> Downloading https://homebrew.bintray.com/bottles/ossp-uuid-1.6.2_2.catalina.bottle.tar.gz
Already downloaded: /Users/nhardi/Library/Caches/Homebrew/downloads/119344d5ea8828b105b537f6b680f9ffd33d9b6da8a6cbaea9db2c85fe89f7dd--ossp-uuid-1.6.2_2.catalina.bottle.tar.gz
==> Pouring ossp-uuid-1.6.2_2.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/ossp-uuid/1.6.2_2: 18 files, 209.5KB
nhardi@nhardi-mbp ~/alice> brew uninstall ossp-uuid
Uninstalling /usr/local/Cellar/ossp-uuid/1.6.2_2... (18 files, 209.5KB)

By the way, XRootD Python bindings require at the moment brew Python3 to be linked. There is a Jira ticket on that to be fixed, but I don’t have any ETA.

So, here is a hack to make it work in case you need this urgently.

  • check out XRootD as a development package using aliBuild init XRootD and
  • disable pkg-config lookup for uuid by removing line 97:pkg_check_modules(UUID uuid) from cmake/XRootDFindLibs.cmake

This seems to be a bug in upstream XRootD build scripts. Perhaps it should be reported in https://github.com/xrootd/xrootd. Maybe pkg-config/uuid should be disabled on the Mac.

Thank you very much!
I will try this.

… It worked :slight_smile:

Great! @eulisse what do we do about this?
By the way, @mkruger did you link brew python 3 or it worked with the system python3?

I linked the brew python3, so I cannot tell if it also would have worked with the system one.