This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
build for sh fails with "fanotify_mark@@VERSION_libc_er"
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: libc-alpha at sourceware dot org
- Date: Thu, 12 Dec 2013 07:51:40 +0900 (JST)
- Subject: build for sh fails with "fanotify_mark@@VERSION_libc_er"
- Authentication-results: sourceware.org; auth=none
Hi,
During taking a look at soft-float fma/fmaf issue for sh, I've noticed
an error for sh build with fresh git tree:
...
/usr/local/bin/sh3-unknown-linux-gnu-ld: /exp/ldroot/dodes/xsh-libc-sh3orig/libc.so: version node not found for symbol fanotify_mark@@VERSION_libc_er
/usr/local/bin/sh3-unknown-linux-gnu-ld: failed to set dynamic section sizes: Bad value
An odd symbol fanotify_mark@@VERSION_libc_er came from the line
versioned_symbol (libc, __fanotify_mark_er, fanotify_mark, er);
of the generated file misc/stub-syscalls.c. It seems that the line
should be something like:
versioned_symbol (libc, __fanotify_mark_GLIBC_2_16, fanotify_mark, GLIBC_2_16);
The line is generated by sysdeps/unix/Makefile with:
for call in $(unix-stub-syscalls); do \
case $$call in \
*@@*) \
ver=$${call##*@}; call=$${call%%@*}; \
ver=`echo "$ver" | sed 's/\./_/g'`; \
echo "strong_alias (_no_syscall, __$${call}_$${ver})"; \
echo "versioned_symbol (libc, __$${call}_$${ver}, $$call, $$ver);"\
;; \
For my environment, in the command
ver=`echo "$ver" | sed 's/\./_/g'`; \
it looks that echo "$ver" outputs "er" and gets the above odd symbol.
Is this my shell(bash) or make issue?
FYI, the patch below works for me.
diff --git a/sysdeps/unix/Makefile b/sysdeps/unix/Makefile
index 2b607a0..e6adb9d 100644
--- a/sysdeps/unix/Makefile
+++ b/sysdeps/unix/Makefile
@@ -52,13 +52,13 @@ $(objpfx)stub-syscalls.c: $(common-objpfx)sysd-syscalls \
case $$call in \
*@@*) \
ver=$${call##*@}; call=$${call%%@*}; \
- ver=`echo "$ver" | sed 's/\./_/g'`; \
+ ver=`echo "$$ver" | sed 's/\./_/g'`; \
echo "strong_alias (_no_syscall, __$${call}_$${ver})"; \
echo "versioned_symbol (libc, __$${call}_$${ver}, $$call, $$ver);"\
;; \
*@*) \
ver=$${call##*@}; call=$${call%%@*}; \
- ver=`echo "$ver" | sed 's/\./_/g'`; \
+ ver=`echo "$$ver" | sed 's/\./_/g'`; \
echo "strong_alias (_no_syscall, __$${call}_$${ver})"; \
echo "compat_symbol (libc, __$${call}_$${ver}, $$call, $$ver);" \
;; \
Regards,
kaz