Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 693150 - sys-apps/sandbox-2.13 - In file included from .../work/sandbox-2.13/libsandbox/wrappers.c:86: ./symbols.h:30:53: error: expected ‘)’ before numeric constant (ac_cv_func_dlvsym=no system)
Summary: sys-apps/sandbox-2.13 - In file included from .../work/sandbox-2.13/libsandbo...
Status: RESOLVED OBSOLETE
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Sandbox (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Sandbox Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-30 21:52 UTC by Árni Dagur
Modified: 2021-10-18 05:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (file_693150.txt,118.60 KB, text/plain)
2019-08-31 01:12 UTC, Árni Dagur
Details
emerge --info (file_693150.txt,6.19 KB, text/plain)
2019-08-31 01:13 UTC, Árni Dagur
Details
sandbox-2.13/work/sandbox-2.13-abi_x86_32.x86/config.log (file_693150.txt,182.19 KB, text/plain)
2019-08-31 16:57 UTC, Árni Dagur
Details
sandbox-2.13/work/sandbox-2.13-abi_x86_64.amd64/config.log (file_693150.txt,168.52 KB, text/plain)
2019-08-31 16:59 UTC, Árni Dagur
Details
sandbox-2.18/work/sandbox-2.18-abi_x86_32.x86/config.log (file_693150.txt,184.58 KB, text/plain)
2019-08-31 17:00 UTC, Árni Dagur
Details
sandbox-2.18/work/sandbox-2.18-abi_x86_64.amd64/config.log (file_693150.txt,171.02 KB, text/plain)
2019-08-31 17:00 UTC, Árni Dagur
Details
emerge --info sys-libs/glibc (file_693150.txt,6.71 KB, text/plain)
2019-08-31 21:46 UTC, Árni Dagur
Details
expanded -march=native (file_693150.txt,10.05 KB, text/plain)
2019-09-01 14:04 UTC, Árni Dagur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Árni Dagur 2019-08-30 21:52:54 UTC
Here is the full build log: http://dpaste.com/3BAD218.txt
Here is the output of "emerge --info '=sys-apps/sandbox-2.13::gentoo'":  http://dpaste.com/2Y6G4MT.txt
Here is the output of "emerge -pqv '=sys-apps/sandbox-2.13::gentoo'":
```
[ebuild     UD] sys-apps/sandbox-2.13 [2.18] ABI_X86="(32) (64) (-x32)" 
```
Comment 1 Árni Dagur 2019-08-31 01:12:23 UTC
Created attachment 588566 [details]
build.log
Comment 2 Árni Dagur 2019-08-31 01:13:01 UTC
Created attachment 588568 [details]
emerge --info
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2019-08-31 07:29:01 UTC
1. Why do you need to downgrade sandbox?

2. Pleas attach your config.log from build dir. A few basic things fail to detect libc's basic interfaces and the qualified compiler:
> checking for i686-pc-linux-gnu-gcc... gcc -m32
...
> checking for library containing dlopen... no
> checking for dlvsym... no
Comment 4 Árni Dagur 2019-08-31 16:55:23 UTC
(In reply to Sergei Trofimovich from comment #3)
> 1. Why do you need to downgrade sandbox?

At first the error came up when portage attempted to emerge version `2.18`. One of the things I tried when debugging was to mask the `~amd64` versions.
Comment 5 Árni Dagur 2019-08-31 16:57:57 UTC
Created attachment 588586 [details]
sandbox-2.13/work/sandbox-2.13-abi_x86_32.x86/config.log

This may be from a different build attempt than the one `build.log` is from.
Comment 6 Árni Dagur 2019-08-31 16:59:09 UTC
Created attachment 588588 [details]
sandbox-2.13/work/sandbox-2.13-abi_x86_64.amd64/config.log
Comment 7 Árni Dagur 2019-08-31 17:00:12 UTC
Created attachment 588590 [details]
sandbox-2.18/work/sandbox-2.18-abi_x86_32.x86/config.log
Comment 8 Árni Dagur 2019-08-31 17:00:48 UTC
Created attachment 588592 [details]
sandbox-2.18/work/sandbox-2.18-abi_x86_64.amd64/config.log
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2019-08-31 19:30:28 UTC
(In reply to Árni Dagur from comment #7)
> Created attachment 588590 [details]
> sandbox-2.18/work/sandbox-2.18-abi_x86_32.x86/config.log

Let's focus on this most recent sandbox version. Here config.log indicates that your glibc is broken and does not expose dlopen via libdl.so:

configure:11587: gcc -m32 -o conftest -march=native -O2 -pipe -falign-functions=32 -fdiagnostics-color=always  -Wl,-O1 -Wl,--as-needed conftest.c -ldl   >&5
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/sys-apps/sandbox-2.18/temp/ccb3hPR3.o: in function `main':
conftest.c:(.text.startup+0x13): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../lib32/libdl.a(dlopen.o): in function `dlopen':
(.text+0x28): undefined reference to `__dlopen'
collect2: error: ld returned 1 exit status
configure:11587: $? = 1
configure: failed program was:
...

| /* Override any GCC internal prototype to avoid an error.
|    Use char because int might match the return type of a GCC
|    builtin and then its argument prototype would still apply.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| char dlopen ();
| int
| main ()
| {
| return dlopen ();
|   ;
|   return 0;
| }

My guess is that your glibc was somehow miscompiled or corrupted:
1. linker did not find libdl.so at all
2. static libdl.a did not contain dlopen
Both are bugs.

Please post output of:
    $ emerge --info sys-libs/glibc
Comment 10 Árni Dagur 2019-08-31 21:46:13 UTC
Created attachment 588606 [details]
emerge --info sys-libs/glibc

Here it is
Comment 11 Sergei Trofimovich (RETIRED) gentoo-dev 2019-08-31 22:15:06 UTC
(In reply to Árni Dagur from comment #10)
> Created attachment 588606 [details]
> emerge --info sys-libs/glibc
> 
> Here it is

Aha, looks like you use the same CFLAGS for glibc as well (which is fine):

sys-libs/glibc-2.29-r4::gentoo was built with the following:
USE="multiarch (multilib) (split-usr) ssp -audit -caps (-cet) -compile-locales -doc -gd -headers-only -nscd -profile (-selinux) -suid -systemtap -test (-vanilla)" ABI_X86="(64)"
CFLAGS="-march=native -pipe -O2 -fno-strict-aliasing"
CXXFLAGS="-march=native -pipe -O2 -fno-strict-aliasing"

Can you do a few things for me?
1. Expand -march=native and post here:
    https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide#Expand_-march.3Dnative.2C_exact_gcc_version_and_other_system-specific_options
2. Rebuild glibc as-is and check if sandbox-2.28 still fails to build
3. Rebuild glibc without -march=native and check if sandbox-2.28 still fails to build

I'll try to reproduce the failure locally meanwhile.
Comment 12 Árni Dagur 2019-09-01 14:04:08 UTC
Created attachment 588624 [details]
expanded -march=native
Comment 13 Árni Dagur 2019-09-01 14:04:55 UTC
> 2. Rebuild glibc as-is and check if sandbox-2.28 still fails to build

I rebuilt glibc as-is and emerging sandbox-2.18 now works!