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

[CentOS 7.4 64bit] Incorrect libdir variable set by make&install #144

Closed
XeroChen opened this issue Mar 27, 2019 · 2 comments
Closed

[CentOS 7.4 64bit] Incorrect libdir variable set by make&install #144

XeroChen opened this issue Mar 27, 2019 · 2 comments

Comments

@XeroChen
Copy link

System Info:
CentOS Linux release 7.4.1708 (Core)

PKG_CONFIG_PATH
/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib/pkgconfig

pkg-config pkg-config --variable=pc_path
/usr/lib64/pkgconfig:/usr/share/pkgconfig

Build Process:

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC_AND_SHARED=yes -DBUILD_CHIMERA=yes -DCMAKE_INSTALL_PREFIX=/usr --build ..
-- Build type RELEASE
-- Boost version: 1.68.0
-- Build date: 2019-03-27
-- Building shared libraries
-- gcc version 4.8.5
-- g++ version 4.8.5
-- generator is Unix Makefiles
-- Building runtime for multiple microarchitectures
-- Sphinx not found, unable to generate developer reference
-- PCRE version 8.41 or above - building from source.
CMake Warning (dev) at pcre/CMakeLists.txt:71 (PROJECT):
Policy CMP0048 is not set: project() command manages VERSION variables.
Run "cmake --help-policy CMP0048" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

The following variable(s) would be set to empty:

PCRE_VERSION

This warning is for project developers. Use -Wno-dev to suppress it.

CMake Deprecation Warning at pcre/CMakeLists.txt:77 (CMAKE_POLICY):
The OLD behavior for policy CMP0026 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.

-- Could not find OPTIONAL package Readline
-- Could not find OPTIONAL package Editline
-- Could not find libpcap - some examples will not be built
-- Configuring done
-- Generating done
-- Build files have been written to: /root/hyperscan-5.1.0/build

make

Scanning dependencies of target hs_compile_shared
[ 1%] Building CXX object CMakeFiles/hs_compile_shared.dir/src/compiler/asserts.cpp.o
[ 1%] Building CXX object CMakeFiles/hs_compile_shared.dir/src/compiler/compiler.cpp.o
[ 1%] Building CXX object CMakeFiles/hs_compile_shared.dir/src/compiler/error.cpp.o
[ 1%] Building CXX object CMakeFiles/hs_compile_shared.dir/src/fdr/engine_description.cpp.o
[ 1%] Building CXX object CMakeFiles/hs_compile_shared.dir/src/fdr/fdr_compile.cpp.o
.......
[ 43%] Built target hs_exec_common
[ 49%] Built target hs_exec_corei7
[ 55%] Built target hs_exec_avx2
[ 61%] Built target hs_exec_core2
[ 61%] Built target hs_runtime
[ 84%] Built target hs_compile
[ 85%] Built target hs
[ 85%] Built target ragel_ExpressionParser
[ 85%] Built target expressionutil
[ 86%] Built target databaseutil
[ 87%] Built target corpusomatic
[ 87%] Built target crosscompileutil
[ 90%] Built target pcre
[ 90%] Built target chimera
[ 91%] Built target unit-chimera
[ 95%] Built target unit-hyperscan
[ 96%] Built target hsbench
[ 96%] Built target hscheck
[ 97%] Built target ragel_ColliderCorporaParser
[100%] Built target hscollider
[100%] Built target simplegrep

make install

Install the project...
-- Install configuration: "RELEASE"
-- Installing: /usr/lib64/pkgconfig/libhs.pc
-- Installing: /usr/include/hs/hs.h
-- Installing: /usr/include/hs/hs_common.h
-- Installing: /usr/include/hs/hs_compile.h
-- Installing: /usr/include/hs/hs_runtime.h
-- Installing: /usr/lib64/libhs_runtime.a
-- Installing: /usr/lib64/libhs_runtime.so.5.1.0
-- Installing: /usr/lib64/libhs_runtime.so.5
-- Installing: /usr/lib64/libhs_runtime.so
-- Installing: /usr/lib64/libhs.a
-- Installing: /usr/lib64/libhs.so.5.1.0
-- Installing: /usr/lib64/libhs.so.5
-- Installing: /usr/lib64/libhs.so

-- Installing: /usr/include/hs/ch.h
-- Installing: /usr/include/hs/ch_common.h
-- Installing: /usr/include/hs/ch_compile.h
-- Installing: /usr/include/hs/ch_runtime.h
-- Installing: /usr/lib64/libchimera.a
-- Installing: /usr/lib64/pkgconfig/libch.pc
-- Installing: /usr/share/doc/hyperscan/examples/simplegrep.c
-- Installing: /usr/share/doc/hyperscan/examples/pcapscan.cc
-- Installing: /usr/share/doc/hyperscan/examples/patbench.cc
-- Installing: /usr/share/doc/hyperscan/examples/README.md

#pkg-config libch --print-variables
exec_prefix
prefix
libdir
includedir
#pkg-config libch --variable=libdir
/usr/lib
#pkg-config libhs --variable=libdir
/usr/lib

As you can see, when all of this have been done, using pkg-config to retrieve the linker option returns the incorrect library directory /usr/lib, which should be /usr/lib64/ according to the make install result.

@xiangwang1
Copy link
Contributor

Thanks for the fix, we'll merge your pull request to our branch.

@xiangwang1
Copy link
Contributor

Already merged to master.

cosmicexplorer pushed a commit to cosmicexplorer/hyperscan that referenced this issue Dec 30, 2023
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