Package: binutils-gold
Version: 2.20-4
Severity: normal

I've rebuild all packages in debian with binutils-gold and noticed that all
packages using a recent version of /usr/share/aclocal/gtk-2.0.m4

Output is always:
configure:12513: gcc -o conftest -g -O2 -D_REENTRANT -I/usr/include/gtk-2.0 
-I/usr/lib/gtk-2.0/include -
I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 
-I/usr/include/pixman-1 -I/usr/include/freetype2 -
I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include     -Wl,--as-needed -
Wl,--as-needed conftest.c -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 
-lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -
lgio-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 
-lgmodule-2.0 -lglib-2.0    >&5
configure:12513: $? = 0
configure:12513: ./conftest
./conftest: symbol lookup error: ./conftest: undefined symbol: gtk_minor_version
configure:12513: $? = 127
configure: program exited with status 127
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_LOCALE_H 1
| #define HAVE_LC_MESSAGES 1
| #define HAVE_BIND_TEXTDOMAIN_CODESET 1
| #define HAVE_GETTEXT 1
| #define HAVE_DCGETTEXT 1
| #define ENABLE_NLS 1
| /* end confdefs.h.  */
|
| #include <gtk/gtk.h>
| #include <stdio.h>
| #include <stdlib.h>
|
| int
| main ()
| {
|   int major, minor, micro;
|   char *tmp_version;
|
|   system ("touch conf.gtktest");
|
|   /* HP/UX 9 (%...@#!) writes to sscanf strings */
|   tmp_version = g_strdup("2.4.0");
|   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
|      printf("%s, bad version string\n", "2.4.0");
|      exit(1);
|    }
|
|   if ((gtk_major_version != 2) ||
|       (gtk_minor_version != 18) ||
|       (gtk_micro_version != 4))
|     {
|       printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but 
GTK+ (%d.%d.%d)\n",
|              2, 18, 4,
|              gtk_major_version, gtk_minor_version, gtk_micro_version);
|       printf ("*** was found! If pkg-config was correct, then it is best\n");
|       printf ("*** to remove the old version of GTK+. You may also be able to 
fix the error\n");
|       printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or 
by editing\n");
|       printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that 
is\n");
|       printf("*** required on your system.\n");
|       printf("*** If pkg-config was wrong, set the environment variable 
PKG_CONFIG_PATH\n");
|       printf("*** to point to the correct configuration files\n");
|     }
|   else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
|          (gtk_minor_version != GTK_MINOR_VERSION) ||
|            (gtk_micro_version != GTK_MICRO_VERSION))
|     {
|       printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
|            GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
|       printf("*** library (version %d.%d.%d)\n",
|            gtk_major_version, gtk_minor_version, gtk_micro_version);
|     }
|   else
|     {
|       if ((gtk_major_version > major) ||
|         ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
|         ((gtk_major_version == major) && (gtk_minor_version == minor) && 
(gtk_micro_version >= micro)))
|       {
|         return 0;
|        }
|      else
|       {
|         printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
|                gtk_major_version, gtk_minor_version, gtk_micro_version);
|         printf("*** You need a version of GTK+ newer than %d.%d.%d. The 
latest version of\n",
|              major, minor, micro);
|         printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n";);
|         printf("***\n");
|         printf("*** If you have already installed a sufficiently new version, 
this error\n");
|         printf("*** probably means that the wrong copy of the pkg-config 
shell script is\n");
|         printf("*** being found. The easiest way to fix this is to remove the 
old version\n");
|         printf("*** of GTK+, but you can also set the PKG_CONFIG environment 
to point to the\n");
|         printf("*** correct copy of pkg-config. (In this case, you will have 
to\n");
|         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit 
/etc/ld.so.conf\n");
|         printf("*** so that the correct libraries are found at run-time))\n");
|       }
|     }
|   return 1;
| }

So i've started to test it without --as-needed and then it works. So it is
probably a bug introduced by fixing #553512.

readelf shows following when linked without --as-needed:
 0x0000000000000001 (NEEDED)             Shared library: [libgtk-x11-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgdk-x11-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libatk-1.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libpangoft2-1.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: 
[libgdk_pixbuf-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: 
[libpangocairo-1.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgio-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libcairo.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libpango-1.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libfreetype.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libfontconfig.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libgobject-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgmodule-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libglib-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

and following when linked with --as-needed
 0x0000000000000001 (NEEDED)             Shared library: [libglib-2.0.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]

I think it should be provided by libgtk-x11-2.0.so.0. If I add -lgtk-x11-2.0
before --as-needed it works.

The reduced size version of the gcc call is:
gcc -o conftest `pkg-config --cflags gtk+-x11-2.0` -Wl,--as-needed conftest.c 
`pkg-config --libs gtk+-x11-2.0`

So you can try to compile the attached program, compile it with the mentioned
gcc call and then try to start it with ./conftest

--- System information. ---
Architecture: amd64
Kernel:       Linux 2.6.31-1-amd64

Debian Release: squeeze/sid
  500 unstable        ftp.debian.org 

--- Package information. ---
Depends           (Version) | Installed
===========================-+-=============
libc6              (>= 2.7) | 2.10.2-2
libgcc1        (>= 1:4.1.1) | 1:4.4.2-3
libstdc++6         (>= 4.3) | 4.4.2-3
zlib1g         (>= 1:1.1.4) | 1:1.2.3.3.dfsg-15
binutils         (= 2.20-4) | 2.20-4


Package's Recommends field is empty.

Package's Suggests field is empty.






-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to