Closed mocchira closed 6 years ago
I've shared the results of some commands as below:
$ uname -a
Linux ubuntu1804 4.15.0-13-generic #14-Ubuntu SMP Sat Mar 17 13:44:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ cmake ..
-- The C compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Found Check: /usr/lib/x86_64-linux-gnu/libcheck.a
-- Linux distro is: Ubuntu 18.04 bionic
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yosuke/dev/projects/leo-project/leofs/deps/libcutil/build
$ make
Scanning dependencies of target cutil
[ 8%] Building C object src/CMakeFiles/cutil.dir/lcu_cache.c.o
[ 16%] Building C object src/CMakeFiles/cutil.dir/lcu_hashmap.c.o
[ 25%] Building C object src/CMakeFiles/cutil.dir/lcu_slab.c.o
[ 33%] Building C object src/CMakeFiles/cutil.dir/lcu_lru.c.o
[ 41%] Building C object src/CMakeFiles/cutil.dir/lcu_string.c.o
[ 50%] Linking C static library libcutil.a
[ 50%] Built target cutil
Scanning dependencies of target test_suites
[ 58%] Building C object tests/CMakeFiles/test_suites.dir/main.c.o
[ 66%] Building C object tests/CMakeFiles/test_suites.dir/check_cache.c.o
[ 75%] Building C object tests/CMakeFiles/test_suites.dir/check_hashmap.c.o
[ 83%] Building C object tests/CMakeFiles/test_suites.dir/check_slab.c.o
[ 91%] Building C object tests/CMakeFiles/test_suites.dir/check_lru.c.o
[100%] Linking C executable test_suites
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libcheck.a(check_log.o): In function `subunit_lfun':
(.text+0x5f4): undefined reference to `subunit_test_start'
(.text+0x6bf): undefined reference to `subunit_test_fail'
(.text+0x6d4): undefined reference to `subunit_test_pass'
(.text+0x6ef): undefined reference to `subunit_test_error'
collect2: error: ld returned 1 exit status
tests/CMakeFiles/test_suites.dir/build.make:200: recipe for target 'tests/test_suites' failed
make[2]: *** [tests/test_suites] Error 1
CMakeFiles/Makefile2:140: recipe for target 'tests/CMakeFiles/test_suites.dir/all' failed
make[1]: *** [tests/CMakeFiles/test_suites.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
@mocchira I've checked this issue was fixed.
https://github.com/leo-project/libcutil/commit/8f75fc03087ea1820c7ec6a342a3bbd02be14613 same hack should be applied to handle 18.04.