Hi, On Fri, May 27, 2022 at 08:07:57AM -0700, Daniel Squires wrote: > Hi, > We have an internal source tree, I'll call it libA for brevity here, which > uses cmake and find_package to build against openssl as follows: > > find_package(OpenSSL REQUIRED) > > The recipe for this source runs fine but some subsequent ones that depend on > it (libB, libC etc) fail on some systems saying that a library file > (libcrypto.so.1.1) required by libA cannot be found. Now it seems that the > build for libA is managing to find and link against libcrypto.so.1.1 from the > host libraries found under /usr. I have seen issues like this many years ago > but not experienced any such issues since then until recently. > > Do we need to do something special in the recipe to prevent this happening? > At first I thought I was going to find some hardcoded absolute paths in the > CMakeLists.txt file of libA as I have in the past but there is nothing like > that.
Usually the problem is that the application CMakeLists.txt or other custom CMake snippet code is not obeying the bitbake generated toolchain.cmake file and the variables set there. I presume your application recipe is doing "inherit cmake". The application side can for example overwrite the various variables which set the cross compiler sysroot. Cheers, -Mikko
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#57202): https://lists.yoctoproject.org/g/yocto/message/57202 Mute This Topic: https://lists.yoctoproject.org/mt/91378445/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-