Created attachment 470550 [details] emerge --info Hi! I try to install curl in my prefixed environment (RAP), which fails during the compilation: [...] libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I../include/curl -I../include -I/home/evidgbo/usr/roots/gentoo/var/tmp/portage/net-misc/curl-7.53.1/work/curl-7.53.1/include -I../lib -I/home/evidgbo/usr/roots/gentoo/var/tmp/portage/net-misc/curl-7.53.1/work/curl-7.53.1/lib -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS -I/usr/include -fvisibility=hidden -O2 -pipe -O2 -pipe -pthread -c /home/evidgbo/usr/roots/gentoo/var/tmp/portage/net-misc/curl-7.53.1/work/curl-7.53.1/lib/hostip.c -fPIC -DPIC -o .libs/libcurl_la-hostip.o In file included from /home/evidgbo/usr/roots/gentoo/var/tmp/portage/net-misc/curl-7.53.1/work/curl-7.53.1/lib/urldata.h:161:0, from /home/evidgbo/usr/roots/gentoo/var/tmp/portage/net-misc/curl-7.53.1/work/curl-7.53.1/lib/file.c:52: /usr/include/zlib.h:80:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’ typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); ^ [...] The root cause of the problem that there's -I/usr/include which belongs to the host OS's include dir instead of the prefixed. The host OS's zlib is probably too old for this version curl. If I compile the package step-by-step with ebuild and after the configure phase I edit the config.status and replace this line: S["CPPFLAGS"]="-I/usr/include" With the prefixed version: S["CPPFLAGS"]="-I/home/evidgbo/usr/roots/usr/include" Then everything goes well. Unfortunately I couldn't find out what's the source of this line. Patching config.status is just a workaround, since the whole configure procedure uses -I/usr/include instead of the prefixed version, and thus checks the availability of features/libraries in the host OS not in the prefixed Gentoo -- at least that's what I think.
is this a regression?
Yes, a kind of. I could install 7.50.2 ca. half years ago. If I use the ebuild of 7.50.2 now, then it fails the same way as 7.53.1 does. This says me that not the curl ebuild got changed inappropriately but the compilation framework.
I'll let the prefix people take a look at it. They're better suited to the kind of changes needed. I don't want to add a half-baked solution of the top of my head.
Hmmm, I can't reproduce this. config.status shows empty CPPFLAGS, and I don't see /usr/include being used during the build.
Gábor, thanks for the report. I could not reproduce it on CentOS 6.5 with RAP. What is your host distribution? and what relevant packages does the host have?
Hi! My host is Ubuntu 14.04.5 LTS (Trusty). Some of the relevant packages (just guessing) are: zlib1g/trusty,now 1:1.2.8.dfsg-1ubuntu1 amd64 [installed] autoconf/trusty,now 2.69-6 all [installed] automake/trusty,now 1:1.14.1-2ubuntu1 all [installed] make/trusty,now 3.81-8.2ubuntu3 amd64 [installed] gcc-4.8/trusty-updates,trusty-security,now 4.8.4-2ubuntu1~14.04.3 amd64 [installed] coreutils/trusty-updates,now 8.21-1ubuntu5.4 amd64 [installed] After I removed zlib1g-dev (so removing the zlib header files) from the host OS, then curl was compiled & merged successfully. I created a huge strace to see if there's any place when the compilation "breaks out" of the prefix, but I'm not ready reading it since it is >700Mb, and I'm not sure what to search for.
Thanks I will try to reproduce it on Ubuntu on July 1. You can use sys-apps/sandbox to see when the build system accesses /usr/include.
Created attachment 480826 [details] config.status Interesting. I cannot reproduce the bug with curl-7.54.1 or curl-7.53.1 and with zlib1g-dev installed on Ubuntu 14.04 LTS, on RAP. S["CPPFLAGS"] is not set in my config.status (attached). What USE flags are you using?
Created attachment 481724 [details] make.conf
Created attachment 481726 [details] package.use I've attached my make.conf and package.use. Hope it helps.
what is your `emerge -pv curl`?
$ emerge -pv curl !!! Section 'gentoo_prefix' in repos.conf has name different from repository name 'gentoo' set inside repository These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] net-misc/curl-7.54.1::gentoo USE="ipv6 rtmp ssh ssl threads -adns -http2 -idn -kerberos -ldap -metalink -samba -static-libs {-test}" CURL_SSL="openssl -axtls -gnutls -libressl -mbedtls -nss (-winssl)" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB Since I could install curl when I removed zlib1g-dev from the host OS, that's why it would reinstall. But since then I added zlib1g-dev to the host OS to be able to further debug this issue.
I can reproduce this bug now with your USE flags. Part of -I/usr/inlucde comes from pkg-config librtmp --cflags.
What is the output of `pkg-config librtmp --cflags`? If it says -I/usr/include, please update to media-video/rtmpdump-2.4_p20161210-r1
Thanks for your report, Gábor. My guess is that 1. your host system has librtmp-dev installed and therefore configure did not fail even the librtmp pointed to the host. But -I /usr/include is added to CPPFLAGS. 2. if you have zlib1g-dev installed, it pollutes the headers. After fixing librtmp.pc, this bug should be solved.
Thank you! It works now as you wrote.