Add glibc as a library#2119
Conversation
|
Locally, this seems to produce a functioning installation of Also, I didn’t test on Ubuntu 22.04; there might be some differences to a more up-to-date system. |
| after_stage_script: | ||
| - mkdir -p build | ||
| - cd build | ||
| - '../{{untar_dir}}/configure --prefix=/opt/compiler-explorer/libs/glibc/glibc-{{name}}' |
There was a problem hiding this comment.
glibc hardcodes its prefix into the installed libraries, so an installation can’t be moved. Is this an issue for CE?
There was a problem hiding this comment.
Sort of, libraries get installed at /tmp/compiler-exp-etc-1245-25324-random/<libraryid> which is /app/<libraryid> under nsjail
It cannot be under /opt/compiler-explorer, the library build and usage process can't write files to that location.
So my suggestion would be --prefix=/app/glibc if we wanna go this route
There was a problem hiding this comment.
Is this true for libraries that are installed via after_stage_script? I basically copied the openssl config here, and the shared libs for that seem to be installed to /opt/compiler-explorer/libs/openssl/...: https://godbolt.org/z/aThPj6ME5
libssl.so.1.1 => /opt/compiler-explorer/libs/openssl/openssl_1_1_1g/x86_64/opt/lib/libssl.so.1.1 (0x00007f5a37800000)
There was a problem hiding this comment.
ah you're right. no, this works, forget what i said
There was a problem hiding this comment.
I am wondering though if this will work with CEFS, possibly not. @mattgodbolt can you help
There was a problem hiding this comment.
I think it’s also possible to install into the staging dir and then let the usual installation logic handle putting it into the prefix, though I’d have to fiddle with the paths a bit more to make sure everything’s correct.
There was a problem hiding this comment.
With 7f4e2d5 glibc is installed into the staging_dir and ce_install handles moving it to /opt/compiler-explorer/libs/glibc/....
I’m not quite sure how libraries work, so this only adds two versions of
glibcas a test. If the build configuration works, I’d like to add more versions.For compiler-explorer/compiler-explorer#3103.