Open psyhtest opened 7 years ago
In fact, even if GLog is installed via CK (from trunk, although a stable package is wanted), the problem is the same.
There is an issue that I noticed some time ago and it's not fixed. When mixing automatically detected libs and installed via CK, a system path /usr/lib64 can be added to LD_LIBRARY_PATH in the middle and it mixes up linking (i.e. part of the libs will be from CK and part suddenly overloaded from /usr/lib64). There is no obvious solution and I found that other package managers/cmake complain about the same issue... One of the ideas is to avoid using LD_LIBRARY_PATH and always use full explicit paths, but not all native packages support that (cmake often tries to be smart)... That's why I had this ugly trick with adding boost twice ...
As I mentioned, boosting (sic:)) the order of:
"lib-boost": {
"force_add_static_lib_path": "yes",
"local": "yes",
"name": "Boost library",
"sort": 13,
"tags": "lib,boost"
},
to 4, eliminated the link-time warnings and run-time failures.
Moreover, I could get rid of:
"boost": {
"local": "yes",
"name": "Boost C++ libraries",
"skip_from_bat": "yes",
"sort": 30,
"tags": "lib,boost"
},
completely (at least on my Ubuntu laptop).
Is it still needed? If yes, I suggest we clean this across all the programs e.g. as follows:
"lib-boost": {
"force_add_static_lib_path": "yes",
"local": "yes",
"name": "Boost library",
"sort": 4,
"tags": "lib,boost"
},
"lib-boost2": {
"local": "yes",
"name": "Boost library (2)",
"skip_from_bat": "yes",
"sort": 400,
"tags": "lib,boost"
},
I'm also confused about the skip_from_bat
and force_add_static_lib_path
keys.
Unfortunately, there are some nuances on some platforms, so I would suggest not to touch it now! The solution is to avoid using LD_LIBRARY_PATH with mixing CK-installed packages and usr/lib, but instead use only explicit paths ... But it's not done yet, and will require various changes in the CK ... I would prefer not to do it right now since we can break lots of deps ... But I am thinking one day to update handling of such vars in the CK when I have more time ...
I've found several issues with the Boost dependencies in the Caffe classification and detection programs (
caffe-classification
,caffe-classification-cuda
,caffe-classification-opencl
,caffe-detection-ssd
,caffe-detection-ssd-cuda
).Boost is specified twice as follows:
Apart from the obvious name difference, the first dependency specifies
"skip_from_bat": "yes"
, while the second dependency specifies"force_add_static_lib_path": "yes"
. Removing the first dependency seems not to affect anything at compile or runtime on Linux. But I'm cautious not to commit this change until we understand possible implications on Windows and Android.With the
lib-boost
sort order of 13, using a non-system Boost installed via CK (e.g.ck install package:lib-boost-1.62.0
) results in the following link warnings:and a runtime failure suggesting the conflict does happen:
Changing the sort order to 6 eliminates the warnings:
Interestingly, increasing the sort order past 6 produces the same warnings and failures. Now, the sort order of 7 given to
lib-glog
, so I suspect it is GLog that "mixes in" the system Boost 1.58.0.Now, I am currently using the system GLog as well.
Next, I'll try to install GLog via CK.