Discussion:
[Mesa-dev] [Bug 101851] [regression] libEGL_common.a undefined reference to '__gxx_personality_v0'
b***@freedesktop.org
2017-07-19 23:31:30 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=101851

Bug ID: 101851
Summary: [regression] libEGL_common.a undefined reference to
'__gxx_personality_v0'
Product: Mesa
Version: git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: EGL
Assignee: mesa-***@lists.freedesktop.org
Reporter: ***@fireburn.co.uk
QA Contact: mesa-***@lists.freedesktop.org

Created attachment 132780
--> https://bugs.freedesktop.org/attachment.cgi?id=132780&action=edit
Build log

Here's the error:

libtool: link: ( cd ".libs" && rm -f "libEGL_common.la" && ln -s
"../libEGL_common.la" "libEGL_common.la" )
/bin/sh ../../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -m32
-I/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/include
-I/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/egl/main
-I/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/gbm/main
-I/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-D_GNU_SOURCE -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DNDEBUG
-DTEXTURE_FLOAT_ENABLED -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM
-DUSE_SSE_ASM -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF
-DHAVE_MKOSTEMP -DHAVE_DLOPEN -DHAVE_DL_ITERATE_PHDR -DHAVE_POSIX_MEMALIGN
-DHAVE_LIBDRM -DGLX_USE_DRM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING
-DGLX_USE_TLS -DHAVE_X11_PLATFORM -DHAVE_SURFACELESS_PLATFORM
-DHAVE_WAYLAND_PLATFORM -DHAVE_DRM_PLATFORM -DHAVE_DRI3 -DENABLE_SHADER_CACHE
-DHAVE_MINCORE -DHAVE_ST_VDPAU -DHAVE_LLVM=0x0500 -DMESA_LLVM_VERSION_PATCH=0
-fvisibility=hidden -I/usr/include/libdrm
-D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_X11
-I/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/loader
-I../../src/egl/drivers/dri2
-I/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/egl/drivers/dri2
-I/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/gbm/backends/dri
-I/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/egl/wayland/wayland-egl
-I../../src/egl/wayland/wayland-drm
-I/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999/src/egl/wayland/wayland-drm
-DDEFAULT_DRIVER_DIR=\"/usr/lib32/dri\" -D_EGL_BUILT_IN_DRIVER_DRI2 -O2
-march=native -pipe -Wall -std=c99 -Werror=implicit-function-declaration
-Werror=missing-prototypes -fno-math-errno -fno-trapping-math -no-undefined
-version-number 1:0 -Wl,-Bsymbolic -Wl,--gc-sections -Wl,--no-undefined -Wl,-O1
-Wl,--hash-style=gnu -Wl,--as-needed -o libEGL.la -rpath /usr/lib32
libEGL_common.la
libtool: link: x86_64-pc-linux-gnu-gcc -m32 -shared -fPIC -DPIC
-Wl,--whole-archive ./.libs/libEGL_common.a -Wl,--no-whole-archive -Wl,-rpath
-Wl,/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999-abi_x86_32.x86/src/gbm/.libs
-Wl,--as-needed -lpthread -lxcb-dri2 -lX11-xcb -lX11 -lxcb -lxcb-dri3
-lxcb-xfixes -lxcb-present -lxcb-sync -lxshmfence -lz
/var/tmp/portage/media-libs/mesa-9999/work/mesa-9999-abi_x86_32.x86/src/gbm/.libs/libgbm.so
-lwayland-client -lwayland-server -lexpat -lm -ldl -ldrm -m32 -O2
-march=native -Wl,-Bsymbolic -Wl,--gc-sections -Wl,--no-undefined -Wl,-O1
-Wl,--hash-style=gnu -pthread -Wl,-soname -Wl,libEGL.so.1 -o
.libs/libEGL.so.1.0.0
./.libs/libEGL_common.a(libmesautil_la-string_to_uint_map.o):string_to_uint_map.cpp:DW.ref.__gxx_personality_v0:
error: undefined reference to '__gxx_personality_v0'
collect2: error: ld returned 1 exit status

I've attached the full log too

I think it should be using g++ or including -lstdc++
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
b***@freedesktop.org
2017-07-31 08:37:07 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=101851

Timo Aaltonen <***@ubuntu.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@kde.org

--- Comment #4 from Timo Aaltonen <***@ubuntu.com> ---
*** Bug 101971 has been marked as a duplicate of this bug. ***
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
b***@freedesktop.org
2017-08-11 10:41:53 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=101851

--- Comment #5 from Mike Lothian <***@fireburn.co.uk> ---
I'm seeing this with 17.2-rc2 even when passing -fuse-ld=bfd

libtool: link: ( cd ".libs" && rm -f "libEGL_common.la" && ln -s
"../libEGL_common.la" "libEGL_common.la" )
/bin/sh ../../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc
-I/var/tmp/portage/media-libs/mesa-17.2.0_rc3/work/mesa-17.2.0-rc3/include
-I/var/tmp/portage/media-libs/mesa-17.2.0_rc3/work/mesa-17.2.0-rc3/src/egl/main
-I/var/tmp/portage/media-libs/mesa-17.2.0_rc3/work/mesa-17.2.0-rc3/src/gbm/main
-I/var/tmp/portage/media-libs/mesa-17.2.0_rc3/work/mesa-17.2.0-rc3/src
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-D_GNU_SOURCE -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DNDEBUG
-DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H
-DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_DLOPEN -DHAVE_DL_ITERATE_PHDR
-DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM -DGLX_USE_DRM -DGLX_INDIRECT_RENDERING
-DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_X11_PLATFORM
-DHAVE_SURFACELESS_PLATFORM -DHAVE_WAYLAND_PLATFORM -DHAVE_DRM_PLATFORM
-DENABLE_SHADER_CACHE -DHAVE_MINCORE -fvisibility=hidden -I/usr/include/libdrm
-D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_X11
-I/var/tmp/portage/media-libs/mesa-17.2.0_rc3/work/mesa-17.2.0-rc3/src/loader
-I../../src/egl/drivers/dri2
-I/var/tmp/portage/media-libs/mesa-17.2.0_rc3/work/mesa-17.2.0-rc3/src/egl/drivers/dri2
-I/var/tmp/portage/media-libs/mesa-17.2.0_rc3/work/mesa-17.2.0-rc3/src/gbm/backends/dri
-I/var/tmp/portage/media-libs/mesa-17.2.0_rc3/work/mesa-17.2.0-rc3/src/egl/wayland/wayland-egl
-I../../src/egl/wayland/wayland-drm
-I/var/tmp/portage/media-libs/mesa-17.2.0_rc3/work/mesa-17.2.0-rc3/src/egl/wayland/wayland-drm
-DDEFAULT_DRIVER_DIR=\"/usr/lib64/dri\" -D_EGL_BUILT_IN_DRIVER_DRI2 -O2
-march=native -pipe -Wall -std=c99 -Werror=implicit-function-declaration
-Werror=missing-prototypes -fno-math-errno -fno-trapping-math -no-undefined
-version-number 1:0 -Wl,-Bsymbolic -Wl,--gc-sections -Wl,--no-undefined -Wl,-O1
-Wl,--hash-style=gnu -Wl,--as-needed -fuse-ld=bfd -o libEGL.la -rpath
/usr/lib64 libEGL_common.la
libtool: link: x86_64-pc-linux-gnu-gcc -shared -fPIC -DPIC
-Wl,--whole-archive ./.libs/libEGL_common.a -Wl,--no-whole-archive -Wl,-rpath
-Wl,/var/tmp/portage/media-libs/mesa-17.2.0_rc3/work/mesa-17.2.0-rc3-abi_x86_64.amd64/src/gbm/.libs
-lpthread -lX11-xcb -lX11 -lxcb -lxcb-dri2 -lxcb-xfixes -lz
/var/tmp/portage/media-libs/mesa-17.2.0_rc3/work/mesa-17.2.0-rc3-abi_x86_64.amd64/src/gbm/.libs/libgbm.so
-lwayland-client -lwayland-server -lexpat -lm -ldl -ldrm -O2 -march=native
-Wl,-Bsymbolic -Wl,--gc-sections -Wl,--no-undefined -Wl,-O1
-Wl,--hash-style=gnu -Wl,--as-needed -pthread -Wl,-soname -Wl,libEGL.so.1 -o
.libs/libEGL.so.1.0.0
./.libs/libEGL_common.a(libmesautil_la-string_to_uint_map.o):string_to_uint_map.cpp:DW.ref.__gxx_personality_v0:
error: undefined reference to '__gxx_personality_v0'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:1017: libEGL.la] Error 1
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
b***@freedesktop.org
2017-08-16 11:27:11 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=101851

James Harvey <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmail.com
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2017-08-20 00:51:48 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=101851

--- Comment #6 from Steve Arnold <***@gentoo.org> ---
I think one of the main problems is libtool failing to pass flags specified by
the user; note in the previous comment #5 it fails to pass "-fuse-ld=bfd".
Also, I'm assuming the upstream flag -Wl,--no-undefined is recent otherwise
this would be visible in previous versions. So I think the real answer for now
is g++ and -lstdc++ as needed, then long-term get rid of libtool and use
pkg-config instead. Just my $0.02...
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
b***@freedesktop.org
2017-08-24 23:12:07 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=101851

Alec Moskvin <***@gmx.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@gmx.com
--
You are receiving this mail because:
You are the assignee for the bug.
b***@freedesktop.org
2017-08-26 09:57:53 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=101851

--- Comment #7 from Emil Velikov <***@gmail.com> ---
(In reply to Steve Arnold from comment #6)
Post by b***@freedesktop.org
I think one of the main problems is libtool failing to pass flags specified
by the user; note in the previous comment #5 it fails to pass
"-fuse-ld=bfd". Also, I'm assuming the upstream flag -Wl,--no-undefined is
recent otherwise this would be visible in previous versions. So I think the
real answer for now is g++ and -lstdc++ as needed, then long-term get rid of
libtool and use pkg-config instead. Just my $0.02...
Most of this is off I'm afraid. I'm 99.9% sure that -fuse-ld... works
correctly, since Mike uses Gentoo and they pull the following patch.

http://git.savannah.gnu.org/cgit/libtool.git/commit/?id=f9970d99293faf908fdc153a653fa5781095fb7a

While the -Wl,--no-undefined flag has been around since 2014 with commit
d187a150d45cbf5bd3476eab49be5057382c2c86.

All, please try ti the following patch - it resolves the problem on my end.

https://patchwork.freedesktop.org/patch/173778/
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
b***@freedesktop.org
2017-08-26 11:29:45 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=101851

--- Comment #8 from James Harvey <***@gmail.com> ---
Hi Emil,
I applied your patch against mesa-17.2.0_rc5 on gentoo, it fixed the build
failure for me. I did a quick test with eglgears on both X11 and wayland and
didn't see any problems. Thanks!
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
b***@freedesktop.org
2017-08-29 09:43:54 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=101851

--- Comment #9 from Mike Lothian <***@fireburn.co.uk> ---
I've just tested this patch with 17.2-rc5 it does indeed allow compilation with
ld.gold again :D

Feel free to add my tested by, hope this lands in 17.2 final
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
b***@freedesktop.org
2017-08-29 14:27:58 UTC
Permalink
https://bugs.freedesktop.org/show_bug.cgi?id=101851

Emil Velikov <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED

--- Comment #10 from Emil Velikov <***@gmail.com> ---
Thanks all. Merged as

commit 0ac78dc92582a59d4319ebce019b4caa41fb432d
Author: Emil Velikov <***@collabora.com>
Date: Sat Aug 26 02:37:11 2017 +0100

util: move string_to_uint_map to glsl
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
Loading...