Renato Botelho
2010-03-04 15:24:31 UTC
I was updating sharutils to 4.8 on FreeBSD ports tree when I got following
error:
cc -O2 -pipe -fno-strict-aliasing -o unshar unshar.o encode.o
../lib/libgnu.a /usr/local/lib/libintl.so -L/usr/local/lib
/usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib ../lib/libgnu.a
unshar.o(.text+0x637): In function `main':
: undefined reference to `gnu_basename'
*** Error code 1
mv -f .deps/shar.Tpo .deps/shar.Po
1 error
*** Error code 1
1 error
*** Error code 2
1 error
*** Error code 1
Following patch fixed the problem:
--- lib/basename.h.bak 2007-06-26 11:28:57.000000000 -0300
+++ lib/basename.h 2010-03-04 12:23:55.000000000 -0300
@@ -33,8 +33,8 @@
#if !(__GLIBC__ >= 2)
/* When not using the GNU libc we use the basename implementation we
provide here. */
-extern char *gnu_basename PARAMS ((const char *));
-#define basename(Arg) gnu_basename (Arg)
+extern char *base_name PARAMS ((const char *));
+#define basename(Arg) base_name (Arg)
#endif
#endif /* _BASENAME_H */
Regards
error:
cc -O2 -pipe -fno-strict-aliasing -o unshar unshar.o encode.o
../lib/libgnu.a /usr/local/lib/libintl.so -L/usr/local/lib
/usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib ../lib/libgnu.a
unshar.o(.text+0x637): In function `main':
: undefined reference to `gnu_basename'
*** Error code 1
mv -f .deps/shar.Tpo .deps/shar.Po
1 error
*** Error code 1
1 error
*** Error code 2
1 error
*** Error code 1
Following patch fixed the problem:
--- lib/basename.h.bak 2007-06-26 11:28:57.000000000 -0300
+++ lib/basename.h 2010-03-04 12:23:55.000000000 -0300
@@ -33,8 +33,8 @@
#if !(__GLIBC__ >= 2)
/* When not using the GNU libc we use the basename implementation we
provide here. */
-extern char *gnu_basename PARAMS ((const char *));
-#define basename(Arg) gnu_basename (Arg)
+extern char *base_name PARAMS ((const char *));
+#define basename(Arg) base_name (Arg)
#endif
#endif /* _BASENAME_H */
Regards
--
Renato Botelho <garga @ FreeBSD.org>
<garga @ freebsdbrasil.com.br>
GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc
No evil can happen to a good man.
-- Plato
Renato Botelho <garga @ FreeBSD.org>
<garga @ freebsdbrasil.com.br>
GnuPG Key: http://www.FreeBSD.org/~garga/pubkey.asc
No evil can happen to a good man.
-- Plato