Bug #3120
closedBuilding on glibc 2.16 where clock_gettime() is in librt.so
Description
I'm trying to build 1.4.63 on glibc 2.16 where clock_gettime is in librt.so
[31/195] Linking target src/test_common FAILED: src/test_common /pkg/bin/gcc -o src/test_common src/test_common.p/t_test_common.c.o src/test_common.p/t_test_array.c.o src/test_common.p/t_t> /pkg/bin/ld: src/test_common.p/log.c.o: in function `log_buffer_timestamp': /home/gzp/build.pkg/lighttpd/build/1.4.63/../../src/1.4.63/src/log.c:104: undefined reference to `clock_gettime' collect2: error: ld returned 1 exit status
and
[33/195] Linking target src/test_configfile FAILED: src/test_configfile /pkg/bin/gcc -o src/test_configfile src/test_configfile.p/t_test_configfile.c.o src/test_configfile.p/buffer.c.o src/test_co> /pkg/bin/ld: src/test_configfile.p/log.c.o: in function `log_buffer_timestamp': /home/gzp/build.pkg/lighttpd/build/1.4.63/../../src/1.4.63/src/log.c:104: undefined reference to `clock_gettime' collect2: error: ld returned 1 exit status
I'm using meson and ninja for configuring/building.
(here in redmine could be a new category "build_meson" created?)
Found the block:
conf_data.set('HAVE_CLOCK_GETTIME', compiler.has_header_symbol('time.h', 'clock_gettime')) clock_lib = [] if not(conf_data.get('HAVE_CLOCK_GETTIME')) if compiler.has_function('clock_gettime', args: defs + ['-lrt'], prefix: '#include <time.h>') conf_data.set('HAVE_CLOCK_GETTIME', true) clock_lib = [ compiler.find_library('rt') ] endif endif
in src/meson.build for checking clock_gettime() but I have no clue how should I fix the problem.
Files
Updated by gzpapp@gmail.com almost 3 years ago
- File src_meson.build.diff src_meson.build.diff added
gzpapp@gmail.com wrote:
I'm trying to build 1.4.63 on glibc 2.16 where clock_gettime is in librt.so
I think I have found the solution. Patch attached against src/meson.build, please review.
Updated by gstrauss almost 3 years ago
glibc 2.16 was released in Jun 2012. https://sourceware.org/glibc/wiki/Glibc%20Timeline
Latest glibc release is glibc 2.34.
FYI, the first release of meson was Mar 2013.
Still, I am glad that lighttpd is being updated, even if some other parts of the system are ancient.
Thank you for the patch.
Updated by gstrauss almost 3 years ago
- Category set to build_autotools
- Status changed from New to Patch Pending
- Target version changed from 1.4.xx to 1.4.64
(here in redmine could be a new category "build_meson" created?)
(probably should simply be a 'build' category)
Updated by gstrauss almost 3 years ago
- Status changed from Patch Pending to Fixed
Applied in changeset fae1c0519187cb263259990f7b2aa8fdbc2c374a.
Updated by gzpapp@gmail.com over 2 years ago
gstrauss wrote in #note-4:
Applied in changeset fae1c0519187cb263259990f7b2aa8fdbc2c374a.
Sorry for the delay, redmine messages landed in the spam folder.
The patch fixes the build problem.
Also available in: Atom