graphics/gle fails in the configure stage with this error message: checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes checking for glGetError in -lGL... no configure: error: Cannot find required GL library *** Error code 1 Stop. gle is needed for xscreensaver. It looks like the GL problem here could easily occur to other packages than gle. The real problem is, as shown in the config.log file: configure:9222: checking for glGetError in -lGL configure:9253: gcc -o conftest -O2 -D_FORTIFY_SOURCE=2 -I/usr/pkg/include -I/usr/X11R7/include -I/usr/include -I/usr/pkg/include/libdrm -Wall -I/usr/pkg/include -I/usr/X11R7/include -I/usr/include -I/usr/pkg/include/libdrm -L/usr/pkg/gcc49/lib/gcc/x86_64--netbsd/4.9.4 -Wl,-R/usr/pkg/gcc49/lib/gcc/x86_64--netbsd/4.9.4 -L/usr/pkg/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib conftest.c -lGL -lSM -lICE -L/usr/X11R7/lib -lX11 -lXext -lm >&5 /pkg_comp/obj/pkgsrc/graphics/gle/default/.buildlink/lib/libGL.so: undefined reference to `table_noop_array' collect2: error: ld returned 1 exit status configure:9256: $? = 1 configure: failed program was: | #line 9230 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "gle" | #define VERSION "3.1.0" | #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 STDC_HEADERS 1 | #define HAVE_MEMCPY 1 | #define DELICATE_TESSELATOR 1 | #define AUTO_TEXTURE 1 | #define OPENGL_10 1 | /* end confdefs.h. */ | | /* Override any gcc2 internal prototype to avoid an error. */ | #ifdef __cplusplus | extern "C" | #endif | /* We use char because int might match the return type of a gcc2 | builtin and then its argument prototype would still apply. */ | char glGetError (); | int | main () | { | glGetError (); | ; | return 0; | } Indeed, libGL.so has an undefined reference to table_noop_array: pkg_comp:gcc49-70.conf# nm /usr/pkg/lib/libGL.so.1.2.0 | grep _noop_ U table_noop_array So I looked further into the sources of MesaLib. There are object files which reference table_noop_array but there is also a definition, so it could work out. .../MesaLib/default/mesa-11.2.2$ find . -name '*.o' | xargs nm | grep table_noop_ U table_noop_array U table_noop_array 0000000000000000 D table_noop_array U table_noop_array U table_noop_array U table_noop_array U table_noop_array U table_noop_array U table_noop_array U table_noop_array 0000000000000000 R table_noop_array U table_noop_array U table_noop_array U table_noop_array The definition is in ./src/mapi/.libs/shared_glapi_libglapi_impl.la-table.o and ends up in ./src/mapi/shared-glapi/.libs/libglapi.so. Somehow a reference is sneaking in to libGL, as there are references in ./src/glx/.libs/libGL.so ./src/mapi/es1api/.libs/libGLESv1_CM.so ./src/mapi/es2api/.libs/libGLESv2.so or, when looking in the object files, ./src/mapi/.libs/shared_glapi_libglapi_impl.la-entry.o ./src/mapi/.libs/shared_glapi_libglapi_impl.la-mapi_glapi.o ./src/mapi/.libs/es1api_libGLESv1_CM_la-entry.o ./src/mapi/.libs/shared_glapi_libglapi_impl.la-u_current.o ./src/mapi/.libs/es2api_libGLESv2_la-entry.o ./src/mapi/.libs/glapi_libglapi_impl.la-entry.o ./src/mapi/shared_glapi_libglapi_impl.la-entry.o ./src/mapi/shared_glapi_libglapi_impl.la-mapi_glapi.o ./src/mapi/es1api_libGLESv1_CM_la-entry.o ./src/mapi/es2api_libGLESv2_la-entry.o ./src/mapi/shared_glapi_libglapi_impl.la-u_current.o ./src/mapi/glapi_libglapi_impl.la-entry.o The declaration looks to be in ./mapi/entry_x86_tls.h:extern const mapi_func table_noop_array[]; and references may be ./src/mapi/mapi_glapi.c: memcpy(table, table_noop_array, num_entries * sizeof(mapi_func)); ./src/mapi/table.h: return (const struct mapi_table *) table_noop_array; ./mapi/entry_x86_tls.h: #ifdef __NetBSD__ extern const mapi_func table_noop_array[]; #define STUB_ASM_CODE(slot) \ "call x86_current_tls\n\t" \ "movl %gs:(%eax), %eax\n\t" \ "testl %eax, %eax\n\t" \ "je 1f\n\t" \ "jmp *(4 * " slot ")(%eax)\n\t" \ "1:\n\t" \ "call 2f\n" \ "2:\n\t" \ "popl %eax\n\t" \ "addl $_GLOBAL_OFFSET_TABLE_+[.-1b], %eax\n\t" \ "movl table_noop_array@GOT(%eax), %eax\n\t" \ "jmp *(4 * " slot ")(%eax)" #else ./mapi/entry_x86-64_tls.h: #ifdef __NetBSD__ #define STUB_ASM_CODE(slot) \ "movq " ENTRY_CURRENT_TABLE "@GOTTPOFF(%rip), %rax\n\t" \ "movq %fs:(%rax), %r11\n\t" \ "testq %r11, %r11\n\t" \ "cmoveq table_noop_array@GOTPCREL(%rip), %r11\n\t" \ "jmp *(8 * " slot ")(%r11)" #else so stuff with tls = thread local storage? It looks like these __NetBSD__ hacks cause the undef'd symbol. How to fix this? -Olaf. -- ___ Olaf 'Rhialto' Seibert -- Wayland: Those who don't understand X \X/ rhialto/at/falu.nl -- are condemned to reinvent it. Poorly.
Attachment:
signature.asc
Description: PGP signature