Skip to content
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

srecord-1.65.0 forces install into /usr even if CMAKE_INSTALL_PREFIX is defined #65

Open
nieder opened this issue Dec 2, 2023 · 1 comment

Comments

@nieder
Copy link

nieder commented Dec 2, 2023

The install is being forced into /usr, which is often write-restricted. CMakeLists should honor $CMAKE_INSTALL_PREFIX.

cmake -DCMAKE_INSTALL_NAME_DIR=/opt/sw/lib -DCMAKE_INSTALL_PREFIX=/opt/sw .
...
-- Packaging for Macintosh
-- gcrypt location 
-- CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION lib
-- CMAKE_INSTALL_PREFIX /usr
-- CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION lib
-- CMAKE_INSTALL_PREFIX /usr
-- CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION lib
-- CMAKE_INSTALL_PREFIX /usr
...
lots of building...
...
make install DESTDIR=/tmp/srecord
Install the project...
/sw/bin/cmake -P cmake_install.cmake
-- Install configuration: "Release"
-- Installing: /tmp/srecord/usr/lib/liblib_srecord.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /tmp/srecord/usr/lib/liblib_srecord.a(vsnprintf.cc.o) has no symbols
-- Installing: /tmp/srecord/usr/include/srecord
-- Installing: /tmp/srecord/usr/include/srecord/format_printf.h
-- Installing: /tmp/srecord/usr/include/srecord/quit.h
-- Installing: /tmp/srecord/usr/include/srecord/endian
...
@iillyyaa
Copy link

iillyyaa commented Jan 5, 2024

I filed PR #68 that fixes this issue as recommended by cmake documentation, while maintaining the default behavior when CMAKE_INSTALL_PREFIX is omitted.
An identical patch has been submitted, reviewed and admitted into yocto's meta-openembedded/meta-oe layer:
openembedded/meta-openembedded@7b66ea1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants