-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libXrdCryptossl-4.so has references to build directory, how to get rid of them? #790
Comments
Hmmm, well, on an RH build it works as expected (i.e. no references to these). That aside, why is this causing a problem?
From: Vladimir Lomov
Sent: Wednesday, August 01, 2018 3:30 AM
To: xrootd/xrootd
Cc: Subscribed
Subject: [xrootd/xrootd] libXrdCryptossl-4.so has references to build directory, how to get rid of them? (#790)
Hello,
I make (unofficial) packages for Archlinux (my Linux distribution) and makepkg (the distro package build tool) warns me that libXrdCryptossl-4.so has references to a build directory. When I run
$ strings libXrdCryptossl-4.so | grep BUILD_DIR
I see references to three files: XrdCrypto/XrdCryptosslCipher.cc, XrdCrypto/XrdCriptosslX509.cc and XrdCrypto/XrdCryptosslX509Crl.cc. My goal is either to get rid of them (see, for example, "reproducible builds") or make these paths relative by their location in source code directory. After quick glance on first file I found no reference to any special macros (for instance, ___FILE___). Does anyone known what is going on here? How to debug this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi abh3 (Andrew Hanushevsky),
thanks for checking. Could you give a bit more details: do you use cmake, do you use the distribution tools for packaging (I don't know how RPM packages are created, of course, not "manually"), version of tools: gcc, cmake, glibc? I suspect this might be due to cmake (I opened issue for xxHash program with the same question and the author replied that it is ok with make).
First: it is useless. Secondly, I don't understand how these paths are passed to the binaries, so I not sure what consequences it can cause. |
Hi Vladimir.
On Wed, 1 Aug 2018, Vladimir Lomov wrote:
> on an RH build it works as expected (i.e. no references to these)
thanks for checking. Could you give a bit more details: do you use
cmake, do you use the distribution tools for packaging (I don't know how
RPM packages are created, of course, not "manually"), version of tools:
gcc, cmake, glibc?
We use a standard RPM script to build the RPM. You can find it in
xrootd/packaging/makesrpm.sh
it is driven off gthe particular platform in question as you will see in
the enclosing directory. There is nothing magical about it. All the
standad toold you mentioned are used. Be aware that when cmake creates
artifacts in the "src" directory, it also sets runpath and a few other
references so that you can run he executabes in he "src" directory and be
sure you are not referencing anthing out side ot it. These get stripped
off when you build an RPM and we strip them off manually for other kinds
of builds. So, perhaps, you are concerned with the stuff in the "src"
build of cmake. The non-essential refernces are supposed to be
eliminated when a actual distribution package is created.
I suspect this might be due to cmake (I opened issue for xxHash program
with the same question and the author replied that it is ok with make).
Yes, I suspect that is what the case is here.
> That aside, why is this causing a problem?
First: it is useless. Secondly, I don't understand how these paths are
passed to the binaries, so I not sure what consequences it can cause.
The are not supposed to be. The paths are forced by cmake to make sure
that when you run something out of the cmake artifact directory (i.e.
"src") you only reference things that are relevant to the build. When you
create the distribution package, all of that stuff is stripped out so no
side-effects should remain.
Andy
|
Here's the info about RPATH: https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling#default-rpath-settings Are you doing a "make install"? That should be stripping out the RPATH, although it appears the default behavior drifted through different releases. Are you also stripping/relocating the debug symbols? I unfortunately don't have much background for Arch, but RHEL does something like this:
If I manually run that against an install tree that refers to the build directory, I see references from the Reproducible builds are A Good Thing. Hope you can figure it out! |
2Andy (Andrew Hanushevsky):
I didn't think about and now looked into the packaging directory. Both debian and rhel use cmake to build packages, so at first I was confused. Then I tried to build rpm package on Fedora 28. I installed all the necessary tools and packages, then ran
(I extracted this file from rpm using mc) whilst its debug version returns nothing:
I didn't think about that but now I think it is reasonable.
Now I get puzzled. I tried to rebuild the package and checked rpm "archive" (I didn't install the package actually) and I see references to build directory, as in my case, so this is not the information that can be/should be stripped out?
How this is stripped out? By
and still see
2bbockelm (Brian Bockelman):
Thanks for the link, I'll read it later.
More:
or less
By default for my distribution. I have impression that you guys know how the xrootd is build for RH, could you help me understand why I still see references to build directory for that |
Ah-ha! Switching from RHEL7 to FC28, I suddenly see the build directory embedded in this shared library but not others. In fact, it's in the However, I'm similarly stumped. I see nothing in the build logs for the Fedora build that would cause this. @vp1981 - if you look at the object file ( @ellert - any ideas as to why this occurs? Does Xrootd pass the Debian reproducible builds? |
Ok, this is what I did on my Archlinux host:
Since I didn't understand why this should be in
I'm not very familiar with structure of object files but where that string lives in it? |
Hi, |
Yeah - I don't really think it is The other thought I had was something with the dependencies - maybe it's picking something up from an OpenSSL header? |
@bbockelm , As for openssl package from CentOS7/RHEL7 it doesn't have such macros. I suggest always pass |
This has been solved in: 502907d |
Hello,
I make (unofficial) packages for Archlinux (my Linux distribution) and
makepkg
(the distro package build tool) warns me thatlibXrdCryptossl-4.so
has references to a build directory. When I runI see references to three files:
XrdCrypto/XrdCryptosslCipher.cc
,XrdCrypto/XrdCriptosslX509.cc
andXrdCrypto/XrdCryptosslX509Crl.cc
. My goal is either to get rid of them (see, for example, "reproducible builds") or make these paths relative by their location in source code directory. After quick glance on first file I found no reference to any special macros (for instance,___FILE___
). Does anyone known what is going on here? How to debug this?The text was updated successfully, but these errors were encountered: