Project

General

Profile

Actions

Bug #240

closed

Problems compiling userspace-rcu-0.7.0 (and later) on NetBSD

Added by Fredrik Pettai almost 12 years ago. Updated almost 12 years ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Start date:
05/31/2012
Due date:
% Done:

0%

Estimated time:

Description

I saw that Marek's build fix for NetBSD-5 was added to liburcu-0.7.0.
However, some other part of the new code in 0.7.0 (and later) break builds on NetBSD again...
Here is my build log:

bash-4.2$ make
=> Bootstrap dependency digest>=20010302: found digest-20111104
=> Checksum SHA1 OK for userspace-rcu-0.7.2.tar.bz2
=> Checksum RMD160 OK for userspace-rcu-0.7.2.tar.bz2
===> Installing dependencies for liburcu-0.7.2
=> Build dependency libtool-base>=2.2.6bnb3: found libtool-base-2.2.6bnb5
=> Build dependency gmake>=3.81: found gmake-3.82nb3
=> Build dependency pkg-config>=0.19: found pkg-config-0.25nb1
=> Build dependency checkperms>=1.1: found checkperms-1.11
===> Overriding tools for liburcu-0.7.2
===> Extracting for liburcu-0.7.2
===> Patching for liburcu-0.7.2
===> Creating toolchain wrappers for liburcu-0.7.2
===> Configuring for liburcu-0.7.2
=> Modifying GNU configure scripts to avoid --recheck
=> Replacing config-guess with pkgsrc versions
=> Replacing config-sub with pkgsrc versions
=> Replacing install-sh with pkgsrc version
=> Adding run-time search paths to pkg-config files.
=> Checking for portability problems in extracted files
checking build system type... x86_64--netbsd
checking host system type... x86_64--netbsd
checking target system type... x86_64--netbsd
checking for a BSD-compatible install... /usr/bin/install -c -o pettai -g users
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... /usr/bin/awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for x86_64--netbsd-gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking dependency style of cc... gcc3
checking for thread local storage (TLS) class... __thread
checking for x86_64--netbsd-gcc... (cached) cc
checking whether we are using the GNU C compiler... (cached) yes
checking whether cc accepts -g... (cached) yes
checking for cc option to accept ISO C89... (cached) none needed
checking dependency style of cc... (cached) gcc3
checking whether make sets $(MAKE)... (cached) yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... (cached) /usr/bin/egrep
checking for fgrep... /usr/bin/grep -F
checking for ld used by cc... /usr/pkgsrc/wip/liburcu-dev/work/.wrapper/bin/ld
checking if the linker (/usr/pkgsrc/wip/liburcu-dev/work/.wrapper/bin/ld) is GNU ld... yes
checking for BSD
or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... (cached) 262144
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking how to convert x86_64--netbsd file names to x86_64--netbsd format... func_convert_file_noop
checking how to convert x86_64--netbsd file names to toolchain format... func_convert_file_noop
checking for /usr/pkgsrc/wip/liburcu-dev/work/.wrapper/bin/ld option to reload object files... -r
checking for x86_64--netbsd-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... match_pattern /lib[^/]+(\.so|_pic\.a)$
checking for x86_64--netbsd-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for x86_64--netbsd-ar... no
checking for ar... ar
checking for archiver @FILE support... no
checking for x86_64--netbsd-strip... no
checking for strip... strip
checking for x86_64--netbsd-ranlib... no
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for x86_64--netbsd-mt... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... rm: conftest*: No such file or directory
yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/pkgsrc/wip/liburcu-dev/work/.wrapper/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... rm: conftest*: No such file or directory
no
checking dynamic linker characteristics... NetBSD ld.elf_so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for inline... inline
checking for pid_t... yes
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for bzero... yes
checking for gettimeofday... yes
checking for munmap... yes
checking for sched_getcpu... no
checking for strtoul... yes
checking for sysconf... yes
checking if architecture really supports the mfence instruction... yes
checking for sys_futex()... no
checking for sched_setaffinity... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating tests/Makefile
config.status: creating liburcu.pc
config.status: creating liburcu-bp.pc
config.status: creating liburcu-cds.pc
config.status: creating liburcu-qsbr.pc
config.status: creating liburcu-mb.pc
config.status: creating liburcu-signal.pc
config.status: creating config.h
config.status: creating urcu/config.h
config.status: linking urcu/arch/x86.h to urcu/arch.h
config.status: linking urcu/uatomic/x86.h to urcu/uatomic.h
config.status: executing depfiles commands
config.status: executing libtool commands
rm: libtoolT: No such file or directory
SMP support enabled.
=> Modifying libtool scripts to use pkgsrc libtool
===> Building for liburcu-0.7.2
/usr/pkg/bin/gmake all-recursive
gmake1: Entering directory `/usr/pkgsrc/wip/liburcu-dev/work/userspace-rcu-0.7.2'
Making all in .
gmake2: Entering directory `/usr/pkgsrc/wip/liburcu-dev/work/userspace-rcu-0.7.2'
CC wfqueue.lo
CC wfstack.lo
CC compat_futex.lo
CCLD liburcu-common.la
CC urcu.lo
CC urcu-pointer.lo
CCLD liburcu.la
CC urcu-qsbr.lo
CCLD liburcu-qsbr.la
CC liburcu_mb_la-urcu.lo
CC liburcu_mb_la-urcu-pointer.lo
CC liburcu_mb_la-compat_futex.lo
CCLD liburcu-mb.la
CC liburcu_signal_la-urcu.lo
CC liburcu_signal_la-urcu-pointer.lo
CC liburcu_signal_la-compat_futex.lo
CCLD liburcu-signal.la
CC urcu-bp.lo
CCLD liburcu-bp.la
CC rculfqueue.lo
CC rculfstack.lo
CC rculfhash.lo
CC rculfhash-mm-order.lo
CC rculfhash-mm-chunk.lo
CC rculfhash-mm-mmap.lo
rculfhash-mm-mmap.c: In function 'memory_map':
rculfhash-mm-mmap.c:31: error: 'MAP_ANONYMOUS' undeclared (first use in this function)
rculfhash-mm-mmap.c:31: error: (Each undeclared identifier is reported only once
rculfhash-mm-mmap.c:31: error: for each function it appears in.)
rculfhash-mm-mmap.c: In function 'memory_populate':
rculfhash-mm-mmap.c:51: error: 'MAP_ANONYMOUS' undeclared (first use in this function)
rculfhash-mm-mmap.c: In function 'memory_discard':
rculfhash-mm-mmap.c:65: error: 'MAP_ANONYMOUS' undeclared (first use in this function)
gmake2: * [rculfhash-mm-mmap.lo] Error 1
gmake2: Leaving directory `/usr/pkgsrc/wip/liburcu-dev/work/userspace-rcu-0.7.2'
gmake1:
[all-recursive] Error 1
gmake1: Leaving directory `/usr/pkgsrc/wip/liburcu-dev/work/userspace-rcu-0.7.2'
gmake: *
* [all] Error 2
  • Error code 2
Stop.
make: stopped in /usr/pkgsrc/wip/liburcu-dev
  • Error code 1

Stop.
make: stopped in /usr/pkgsrc/wip/liburcu-dev


Related issues 1 (0 open1 closed)

Related to Userspace RCU - Bug #288: missing config/ax_tls.m4 link-time __thread testsResolvedMathieu Desnoyers06/22/2012

Actions
Actions #1

Updated by Mathieu Desnoyers almost 12 years ago

[...]

CC rculfhash-mm-mmap.lo
rculfhash-mm-mmap.c: In function 'memory_map':
rculfhash-mm-mmap.c:31: error: 'MAP_ANONYMOUS' undeclared (first use in this function)
rculfhash-mm-mmap.c:31: error: (Each undeclared identifier is reported only once
rculfhash-mm-mmap.c:31: error: for each function it appears in.)
rculfhash-mm-mmap.c: In function 'memory_populate':
rculfhash-mm-mmap.c:51: error: 'MAP_ANONYMOUS' undeclared (first use in this function)
rculfhash-mm-mmap.c: In function 'memory_discard':
rculfhash-mm-mmap.c:65: error: 'MAP_ANONYMOUS' undeclared (first use in this function)
gmake2: * [rculfhash-mm-mmap.lo] Error 1
gmake2: Leaving directory `/usr/pkgsrc/wip/liburcu-dev/work/userspace-rcu-0.7.2'
gmake1:
[all-recursive] Error 1
gmake1: Leaving directory `/usr/pkgsrc/wip/liburcu-dev/work/userspace-rcu-0.7.2'
gmake: *
* [all] Error 2
  • Error code 2

Can you try with the git master HEAD ? The following commit should
already take care of this issue.

commit 0d0cf93f74adf0367b3f9d007351984e91d6e91f
Author: Mathieu Desnoyers <>
Date: Sat May 26 11:00:16 2012 -0400

freebsd 8.2 fix: define MAP_ANONYMOUS for compatibility
Signed-off-by: Mathieu Desnoyers &lt;&gt;

Let me know if it works fine for you,

Thanks!

Mathieu

--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

Actions #2

Updated by Mathieu Desnoyers almost 12 years ago

  • Status changed from New to Feedback
  • Assignee set to Mathieu Desnoyers
Actions #3

Updated by Fredrik Pettai almost 12 years ago

Yet another problem emerged...

===> Building for userspace-rcu-0.7nb20120601
/usr/bin/make all-recursive
Making all in .
CC wfqueue.lo
CC wfstack.lo
CC compat_futex.lo
CCLD liburcu-common.la
CC urcu.lo
CC urcu-pointer.lo
CCLD liburcu.la
CC urcu-qsbr.lo
CCLD liburcu-qsbr.la
CC liburcu_mb_la-urcu.lo
CC liburcu_mb_la-urcu-pointer.lo
CC liburcu_mb_la-compat_futex.lo
CCLD liburcu-mb.la
CC liburcu_signal_la-urcu.lo
CC liburcu_signal_la-urcu-pointer.lo
CC liburcu_signal_la-compat_futex.lo
CCLD liburcu-signal.la
CC urcu-bp.lo
CCLD liburcu-bp.la
CC rculfqueue.lo
CC rculfstack.lo
CC rculfhash.lo
CC rculfhash-mm-order.lo
CC rculfhash-mm-chunk.lo
CC rculfhash-mm-mmap.lo
CCLD liburcu-cds.la
make: don't know how to make ./urcu/map/*.h. Stop

make: stopped in /usr/pkgsrc/wip/liburcu-git/work/userspace-rcu
  • Error code 1
Stop.
make: stopped in /usr/pkgsrc/wip/liburcu-git/work/userspace-rcu
  • Error code 1
Stop.
make: stopped in /usr/pkgsrc/wip/liburcu-git/work/userspace-rcu
  • Error code 1
Stop.
make: stopped in /usr/pkgsrc/wip/liburcu-git
  • Error code 1

Stop.
make: stopped in /usr/pkgsrc/wip/liburcu-git

Actions #4

Updated by Fredrik Pettai almost 12 years ago

Switching over to GNUmake got me further, but I see a lot of warnings before ever this build aborts with a error.
  • Error code 2
CCLD   liburcu-cds.la
gmake[2]: Leaving directory `/usr/pkgsrc/wip/liburcu-git/work/userspace-rcu'
Making all in doc
gmake[2]: Entering directory `/usr/pkgsrc/wip/liburcu-git/work/userspace-rcu/doc'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/usr/pkgsrc/wip/liburcu-git/work/userspace-rcu/doc'
Making all in tests
gmake[2]: Entering directory `/usr/pkgsrc/wip/liburcu-git/work/userspace-rcu/tests'
CC test_urcu.o
test_urcu.c:55:2: warning: #warning "use pid as tid"
CC urcu.o
CC urcu-pointer.o
CC wfqueue.o
CC compat_futex.o
CCLD test_urcu
CC test_urcu_dynamic_link-test_urcu.o
test_urcu.c:55:2: warning: #warning "use pid as tid"
CC test_urcu_dynamic_link-urcu.o
CC test_urcu_dynamic_link-urcu-pointer.o
CC test_urcu_dynamic_link-wfqueue.o
CC test_urcu_dynamic_link-compat_futex.o
CCLD test_urcu_dynamic_link
CC test_urcu_timing.o
test_urcu_timing.c:47:2: warning: #warning "use pid as tid"
CCLD test_urcu_timing
CC test_urcu_signal-test_urcu.o
test_urcu.c:55:2: warning: #warning "use pid as tid"
CC test_urcu_signal-urcu.o
CC test_urcu_signal-urcu-pointer.o
CC test_urcu_signal-wfqueue.o
CC test_urcu_signal-compat_futex.o
CCLD test_urcu_signal
CC test_urcu_signal_dynamic_link-test_urcu.o
test_urcu.c:55:2: warning: #warning "use pid as tid"
CC test_urcu_signal_dynamic_link-urcu.o
CC test_urcu_signal_dynamic_link-urcu-pointer.o
CC test_urcu_signal_dynamic_link-wfqueue.o
CC test_urcu_signal_dynamic_link-compat_futex.o
CCLD test_urcu_signal_dynamic_link
CC test_urcu_signal_timing-test_urcu_timing.o
test_urcu_timing.c:47:2: warning: #warning "use pid as tid"
CC test_urcu_signal_timing-urcu.o
CC test_urcu_signal_timing-urcu-pointer.o
CC test_urcu_signal_timing-wfqueue.o
CC test_urcu_signal_timing-compat_futex.o
CCLD test_urcu_signal_timing
CC test_rwlock_timing.o
test_rwlock_timing.c:50:2: warning: #warning "use pid as tid"
CCLD test_rwlock_timing
CC test_rwlock.o
test_rwlock.c:55:2: warning: #warning "use pid as tid"
CCLD test_rwlock
CC test_perthreadlock_timing.o
test_perthreadlock_timing.c:49:2: warning: #warning "use pid as tid"
CCLD test_perthreadlock_timing
CC test_perthreadlock.o
test_perthreadlock.c:55:2: warning: #warning "use pid as tid"
CCLD test_perthreadlock
CC test_urcu_yield-test_urcu.o
test_urcu.c:55:2: warning: #warning "use pid as tid"
CC test_urcu_yield-urcu.o
CC test_urcu_yield-urcu-pointer.o
CC test_urcu_yield-wfqueue.o
CC test_urcu_yield-compat_futex.o
CCLD test_urcu_yield
CC test_urcu_signal_yield-test_urcu.o
test_urcu.c:55:2: warning: #warning "use pid as tid"
CC test_urcu_signal_yield-urcu.o
CC test_urcu_signal_yield-urcu-pointer.o
CC test_urcu_signal_yield-wfqueue.o
CC test_urcu_signal_yield-compat_futex.o
CCLD test_urcu_signal_yield
CC test_urcu_mb-test_urcu.o
test_urcu.c:55:2: warning: #warning "use pid as tid"
CC test_urcu_mb-urcu.o
CC test_urcu_mb-urcu-pointer.o
CC test_urcu_mb-wfqueue.o
CC test_urcu_mb-compat_futex.o
CCLD test_urcu_mb
CC test_urcu_qsbr_timing.o
test_urcu_qsbr_timing.c:48:2: warning: #warning "use pid as tid"
CC urcu-qsbr.o
CCLD test_urcu_qsbr_timing
CC test_urcu_qsbr.o
test_urcu_qsbr.c:55:2: warning: #warning "use pid as tid"
CCLD test_urcu_qsbr
CC rcutorture_urcu-urcutorture.o
In file included from urcutorture.c:9:
api.h: In function '__smp_thread_id':
api.h:160: warning: cast from pointer to integer of different size
api.h:160: warning: cast from pointer to integer of different size
api.h: In function 'wait_thread':
api.h:210: warning: cast from pointer to integer of different size
api.h:210: warning: cast from pointer to integer of different size
CCLD rcutorture_urcu
CC rcutorture_urcu_signal-urcutorture.o
In file included from urcutorture.c:9:
api.h: In function '__smp_thread_id':
api.h:160: warning: cast from pointer to integer of different size
api.h:160: warning: cast from pointer to integer of different size
api.h: In function 'wait_thread':
api.h:210: warning: cast from pointer to integer of different size
api.h:210: warning: cast from pointer to integer of different size
CCLD rcutorture_urcu_signal
../.libs/liburcu-signal.so: undefined reference to `__tls_get_addr'
gmake[2]: * [rcutorture_urcu_signal] Error 1
gmake[2]: Leaving directory `/usr/pkgsrc/wip/liburcu-git/work/userspace-rcu/tests'
gmake[1]:
[all-recursive] Error 1
gmake[1]: Leaving directory `/usr/pkgsrc/wip/liburcu-git/work/userspace-rcu'
gmake: *
* [all] Error 2
Stop.
make: stopped in /usr/pkgsrc/wip/liburcu-git
  • Error code 1

Stop.
make: stopped in /usr/pkgsrc/wip/liburcu-git

Actions #5

Updated by Mathieu Desnoyers almost 12 years ago

Issue #240 has been updated by Fredrik Pettai.

Switching over to GNUmake got me further, but I see a lot of warnings
before ever this build aborts with a error.

Do you think documenting dependency on GNUmake would be enough, or is
the fix really easy to support other *make ?

[...]

gmake2: Entering directory `/usr/pkgsrc/wip/liburcu-git/work/userspace-rcu/tests'
CC test_urcu.o
test_urcu.c:55:2: warning: #warning "use pid as tid"

These warnings are expected on OS that do not provide simething similar
to Linux gettid() (to get the thread ID). It uses getpid() instead in
the output summary printout. Nothing that would keep me from sleeping at
night ;)

[...]

CC rcutorture_urcu-urcutorture.o
In file included from urcutorture.c:9:
api.h: In function '__smp_thread_id':
api.h:160: warning: cast from pointer to integer of different size
api.h:160: warning: cast from pointer to integer of different size
api.h: In function 'wait_thread':
api.h:210: warning: cast from pointer to integer of different size
api.h:210: warning: cast from pointer to integer of different size

See commit 665eb3efcc4557deddb70ecce68ec3b918ae9c5e in userspace rcu
master HEAD. Let me know if this handles it.

[...]

CCLD rcutorture_urcu_signal
../.libs/liburcu-signal.so: undefined reference to `__tls_get_addr'

Can you try to make clean first ? I recently had to bring back the
symbols name in commit 3db1417f5d2f17fdb62f328650c888ae3097c4c5 to
restore ABI compatibility with 0.6.x libs.

Thanks!

Mathieu

--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

Actions #6

Updated by Fredrik Pettai almost 12 years ago

Hi,

Switching over to GNUmake got me further, but I see a lot of warnings
before ever this build aborts with a error.

Do you think documenting dependency on GNUmake would be enough, or is
the fix really easy to support other *make ?

Up to you... pkgsrc handles both BSDmake and GNUmake fine, so we're ok if one of them works :-)
(I personally would focus on showstoppers instead, like the "undefined reference to `__tls_get_addr'")

[...]

gmake2: Entering directory `/usr/pkgsrc/wip/liburcu-git/work/userspace-rcu/tests'
CC test_urcu.o
test_urcu.c:55:2: warning: #warning "use pid as tid"

These warnings are expected on OS that do not provide simething similar
to Linux gettid() (to get the thread ID). It uses getpid() instead in
the output summary printout. Nothing that would keep me from sleeping at
night ;)

Ok.

[...]

CC rcutorture_urcu-urcutorture.o
In file included from urcutorture.c:9:
api.h: In function '__smp_thread_id':
api.h:160: warning: cast from pointer to integer of different size
api.h:160: warning: cast from pointer to integer of different size
api.h: In function 'wait_thread':
api.h:210: warning: cast from pointer to integer of different size
api.h:210: warning: cast from pointer to integer of different size

See commit 665eb3efcc4557deddb70ecce68ec3b918ae9c5e in userspace rcu
master HEAD. Let me know if this handles it.

I tried HEAD from git at ~16 UTC+2, and those warnings are gone. Thx!

[...]

CCLD rcutorture_urcu_signal
../.libs/liburcu-signal.so: undefined reference to `__tls_get_addr'

Can you try to make clean first ? I recently had to bring back the
symbols name in commit 3db1417f5d2f17fdb62f328650c888ae3097c4c5 to
restore ABI compatibility with 0.6.x libs.

Same git checkout as mentioned about, did a make clean after ./bootstrap + make configure
But no different result :(

/P

Actions #7

Updated by Yannick Brosseau almost 12 years ago

Is it still an issue?

Actions #8

Updated by Fredrik Pettai almost 12 years ago

Yes,

I also verified the latest git version (just now), and the last problem is still present.
(This is a NetBSD 5.1_STABLE machine I've testing on)
  • Error code 2
CC     rcutorture_urcu_signal-urcutorture.o
CCLD rcutorture_urcu_signal
../.libs/liburcu-signal.so: undefined reference to `__tls_get_addr'
gmake[2]: * [rcutorture_urcu_signal] Error 1
gmake[2]: Leaving directory `/usr/pkgsrc/wip/liburcu-git/work/userspace-rcu/tests'
gmake[1]:
[all-recursive] Error 1
gmake[1]: Leaving directory `/usr/pkgsrc/wip/liburcu-git/work/userspace-rcu'
gmake: *
* [all] Error 2
Stop.
make: stopped in /usr/pkgsrc/wip/liburcu-git
  • Error code 1

Stop.
make: stopped in /usr/pkgsrc/wip/liburcu-git

On Jun 20, 2012, at 8:15 PM, wrote:

Issue #240 has been updated by Yannick Brosseau.

Is it still an issue?
----------------------------------------
Bug #240: Problems compiling userspace-rcu-0.7.0 (and later) on NetBSD
https://bugs.lttng.org/issues/240#change-527

Author: Fredrik Pettai
Status: Needs feedback
Priority: Normal
Assignee: Mathieu Desnoyers
Category:
Target version:

I saw that Marek's build fix for NetBSD-5 was added to liburcu-0.7.0.
However, some other part of the new code in 0.7.0 (and later) break builds on NetBSD again...
Here is my build log:

bash-4.2$ make
=> Bootstrap dependency digest>=20010302: found digest-20111104
=> Checksum SHA1 OK for userspace-rcu-0.7.2.tar.bz2
=> Checksum RMD160 OK for userspace-rcu-0.7.2.tar.bz2
===> Installing dependencies for liburcu-0.7.2
=> Build dependency libtool-base>=2.2.6bnb3: found libtool-base-2.2.6bnb5
=> Build dependency gmake>=3.81: found gmake-3.82nb3
=> Build dependency pkg-config>=0.19: found pkg-config-0.25nb1
=> Build dependency checkperms>=1.1: found checkperms-1.11
===> Overriding tools for liburcu-0.7.2
===> Extracting for liburcu-0.7.2
===> Patching for liburcu-0.7.2
===> Creating toolchain wrappers for liburcu-0.7.2
===> Configuring for liburcu-0.7.2
=> Modifying GNU configure scripts to avoid --recheck
=> Replacing config-guess with pkgsrc versions
=> Replacing config-sub with pkgsrc versions
=> Replacing install-sh with pkgsrc version
=> Adding run-time search paths to pkg-config files.
=> Checking for portability problems in extracted files
checking build system type... x86_64--netbsd
checking host system type... x86_64--netbsd
checking target system type... x86_64--netbsd
checking for a BSD-compatible install... /usr/bin/install -c -o pettai -g users
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... /usr/bin/awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for x86_64--netbsd-gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking dependency style of cc... gcc3
checking for thread local storage (TLS) class... __thread
checking for x86_64--netbsd-gcc... (cached) cc
checking whether we are using the GNU C compiler... (cached) yes
checking whether cc accepts -g... (cached) yes
checking for cc option to accept ISO C89... (cached) none needed
checking dependency style of cc... (cached) gcc3
checking whether make sets $(MAKE)... (cached) yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... (cached) /usr/bin/egrep
checking for fgrep... /usr/bin/grep -F
checking for ld used by cc... /usr/pkgsrc/wip/liburcu-dev/work/.wrapper/bin/ld
checking if the linker (/usr/pkgsrc/wip/liburcu-dev/work/.wrapper/bin/ld) is GNU ld... yes
checking for BSD
or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... (cached) 262144
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking how to convert x86_64--netbsd file names to x86_64--netbsd format... func_convert_file_noop
checking how to convert x86_64--netbsd file names to toolchain format... func_convert_file_noop
checking for /usr/pkgsrc/wip/liburcu-dev/work/.wrapper/bin/ld option to reload object files... -r
checking for x86_64--netbsd-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... match_pattern /lib[^/]+(\.so|_pic\.a)$
checking for x86_64--netbsd-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for x86_64--netbsd-ar... no
checking for ar... ar
checking for archiver @FILE support... no
checking for x86_64--netbsd-strip... no
checking for strip... strip
checking for x86_64--netbsd-ranlib... no
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for x86_64--netbsd-mt... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... rm: conftest*: No such file or directory
yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/pkgsrc/wip/liburcu-dev/work/.wrapper/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... rm: conftest*: No such file or directory
no
checking dynamic linker characteristics... NetBSD ld.elf_so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for inline... inline
checking for pid_t... yes
checking for size_t... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking for bzero... yes
checking for gettimeofday... yes
checking for munmap... yes
checking for sched_getcpu... no
checking for strtoul... yes
checking for sysconf... yes
checking if architecture really supports the mfence instruction... yes
checking for sys_futex()... no
checking for sched_setaffinity... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating tests/Makefile
config.status: creating liburcu.pc
config.status: creating liburcu-bp.pc
config.status: creating liburcu-cds.pc
config.status: creating liburcu-qsbr.pc
config.status: creating liburcu-mb.pc
config.status: creating liburcu-signal.pc
config.status: creating config.h
config.status: creating urcu/config.h
config.status: linking urcu/arch/x86.h to urcu/arch.h
config.status: linking urcu/uatomic/x86.h to urcu/uatomic.h
config.status: executing depfiles commands
config.status: executing libtool commands
rm: libtoolT: No such file or directory
SMP support enabled.
=> Modifying libtool scripts to use pkgsrc libtool
===> Building for liburcu-0.7.2
/usr/pkg/bin/gmake all-recursive
gmake1: Entering directory `/usr/pkgsrc/wip/liburcu-dev/work/userspace-rcu-0.7.2'
Making all in .
gmake2: Entering directory `/usr/pkgsrc/wip/liburcu-dev/work/userspace-rcu-0.7.2'
CC wfqueue.lo
CC wfstack.lo
CC compat_futex.lo
CCLD liburcu-common.la
CC urcu.lo
CC urcu-pointer.lo
CCLD liburcu.la
CC urcu-qsbr.lo
CCLD liburcu-qsbr.la
CC liburcu_mb_la-urcu.lo
CC liburcu_mb_la-urcu-pointer.lo
CC liburcu_mb_la-compat_futex.lo
CCLD liburcu-mb.la
CC liburcu_signal_la-urcu.lo
CC liburcu_signal_la-urcu-pointer.lo
CC liburcu_signal_la-compat_futex.lo
CCLD liburcu-signal.la
CC urcu-bp.lo
CCLD liburcu-bp.la
CC rculfqueue.lo
CC rculfstack.lo
CC rculfhash.lo
CC rculfhash-mm-order.lo
CC rculfhash-mm-chunk.lo
CC rculfhash-mm-mmap.lo
rculfhash-mm-mmap.c: In function 'memory_map':
rculfhash-mm-mmap.c:31: error: 'MAP_ANONYMOUS' undeclared (first use in this function)
rculfhash-mm-mmap.c:31: error: (Each undeclared identifier is reported only once
rculfhash-mm-mmap.c:31: error: for each function it appears in.)
rculfhash-mm-mmap.c: In function 'memory_populate':
rculfhash-mm-mmap.c:51: error: 'MAP_ANONYMOUS' undeclared (first use in this function)
rculfhash-mm-mmap.c: In function 'memory_discard':
rculfhash-mm-mmap.c:65: error: 'MAP_ANONYMOUS' undeclared (first use in this function)
gmake2: * [rculfhash-mm-mmap.lo] Error 1
gmake2: Leaving directory `/usr/pkgsrc/wip/liburcu-dev/work/userspace-rcu-0.7.2'
gmake1:
[all-recursive] Error 1
gmake1: Leaving directory `/usr/pkgsrc/wip/liburcu-dev/work/userspace-rcu-0.7.2'
gmake: *
* [all] Error 2
  • Error code 2
Stop.
make: stopped in /usr/pkgsrc/wip/liburcu-dev
  • Error code 1

Stop.
make: stopped in /usr/pkgsrc/wip/liburcu-dev

--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.lttng.org/my/account

Actions #9

Updated by Mathieu Desnoyers almost 12 years ago

Issue #240 has been updated by Fredrik Pettai.

Yes,

I also verified the latest git version (just now), and the last problem is still present.
(This is a NetBSD 5.1_STABLE machine I've testing on)

CC rcutorture_urcu_signal-urcutorture.o
CCLD rcutorture_urcu_signal
../.libs/liburcu-signal.so: undefined reference to `__tls_get_addr'
gmake2: * [rcutorture_urcu_signal] Error 1
gmake2: Leaving directory `/usr/pkgsrc/wip/liburcu-git/work/userspace-rcu/tests'
gmake1:
[all-recursive] Error 1
gmake1: Leaving directory `/usr/pkgsrc/wip/liburcu-git/work/userspace-rcu'
gmake: *
* [all] Error 2
  • Error code 2
Stop.
make: stopped in /usr/pkgsrc/wip/liburcu-git
  • Error code 1

Stop.
make: stopped in /usr/pkgsrc/wip/liburcu-git

Hrm, looking at :

http://www.mail-archive.com/guile-devel@gnu.org/msg04644.html

netbsd lacks __thread support at the libc level. That's odd. So our
configure test thinks that __thread is supported (because the compiler
supports it), but it does not test to see if the libc has it. So either
we do a special-case for NetBSD (which is usually frowned upon), or we
modify the TLS model detection m4 file to also test to see if a small
program with __thread variable declared links fine.

If someone can provide a patch to add TLS link-time test to the m4 file,
it would be very appreciated.

Thanks,

Mathieu

--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

Actions #10

Updated by Fredrik Pettai almost 12 years ago

Yes, your partly right there...

NetBSD 5.1 doesn't support TLS, here a fix would be needed... (but strange that I got liburcu-0.6.7 + Marek's patches to compile fine then?)
NetBSD 5.99.xx (from march 2011) to 6.0_BETA2 (soon to be 6.0_RC ... and finally 6.0_RELEASE) does support TLS.
I've now also confirmed that it builds fine on a newer NetBSD system.

I see that userspace-rcu-0.7.3 was released, which contains the fix needed by NetBSD (as reported first in this bug). I can also confirm a successful build with that tarball. pkgsrc is currently in a freeze, but once the freeze is over, I'll commit liburcu-0.7.3 into the main repo (with the limitation that you'll need NetBSD 6.0_* and later...) .

So, should we close this bug, and open a new one with the correct headline and so on...
"Problem building userspace-rcu (in NetBSD 5.1 and older) because of missing TLS support"

/P

Actions #11

Updated by Mathieu Desnoyers almost 12 years ago

Issue #240 has been updated by Fredrik Pettai.

Yes, your partly right there...

NetBSD 5.1 doesn't support TLS, here a fix would be needed... (but
strange that I got liburcu-0.6.7 + Marek's patches to compile fine
then?)

I think Marek's patches did not use autotools TLS detection to move to
the pthread tls fallback. We have that fallback available, it's just a
matter of letting the config/ax_tls.m4 script learn that it needs to
link-test too, since compile-only test is not enough to detect missing
libc __thread support.

NetBSD 5.99.xx (from march 2011) to 6.0_BETA2 (soon to be 6.0_RC ...
and finally 6.0_RELEASE) does support TLS.
I've now also confirmed that it builds fine on a newer NetBSD system.

Great!

I see that userspace-rcu-0.7.3 was released, which contains the fix
needed by NetBSD (as reported first in this bug). I can also confirm a
successful build with that tarball. pkgsrc is currently in a freeze,
but once the freeze is over, I'll commit liburcu-0.7.3 into the main
repo (with the limitation that you'll need NetBSD 6.0_* and later...)

OK, that's a very good start.

.

So, should we close this bug, and open a new one with the correct
headline and so on...
"Problem building userspace-rcu (in NetBSD 5.1 and older) because of
missing TLS support"

OK. I just created bug 288 to track this. I'll close this one.

Thanks!

Mathieu

--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

Actions #12

Updated by Mathieu Desnoyers almost 12 years ago

  • Status changed from Feedback to Resolved

Reportedly solved for NetBSD 6.0 by userspace RCU 0.7.3.

Actions

Also available in: Atom PDF