Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 616202 - [RAP] media-video/rtmpdump-2.4_p20161210: librtmp.pc points to host directory
Summary: [RAP] media-video/rtmpdump-2.4_p20161210: librtmp.pc points to host directory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-21 12:57 UTC by Gábor VIDA
Modified: 2017-08-28 13:08 UTC (History)
2 users (show)

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


Attachments
emerge --info (emerge-info.txt,5.63 KB, text/plain)
2017-04-21 12:57 UTC, Gábor VIDA
Details
config.status (config.status,77.87 KB, text/plain)
2017-07-05 07:06 UTC, Benda Xu
Details
make.conf (make.conf,1.25 KB, text/plain)
2017-07-07 15:48 UTC, Gábor VIDA
Details
package.use (package.use,2.20 KB, text/plain)
2017-07-07 15:50 UTC, Gábor VIDA
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gábor VIDA 2017-04-21 12:57:30 UTC
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.
Comment 1 Anthony Basile gentoo-dev 2017-04-23 12:17:13 UTC
is this a regression?
Comment 2 Gábor VIDA 2017-04-24 09:39:23 UTC
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.
Comment 3 Anthony Basile gentoo-dev 2017-04-24 13:19:45 UTC
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.
Comment 4 Fabian Groffen gentoo-dev 2017-06-21 07:39:35 UTC
Hmmm, I can't reproduce this.  config.status shows empty CPPFLAGS, and I don't see /usr/include being used during the build.
Comment 5 Benda Xu gentoo-dev 2017-06-21 11:14:16 UTC
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?
Comment 6 Gábor VIDA 2017-06-21 15:31:43 UTC
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.
Comment 7 Benda Xu gentoo-dev 2017-06-22 14:31:56 UTC
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.
Comment 8 Benda Xu gentoo-dev 2017-07-05 07:06:52 UTC
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?
Comment 9 Gábor VIDA 2017-07-07 15:48:04 UTC
Created attachment 481724 [details]
make.conf
Comment 10 Gábor VIDA 2017-07-07 15:50:03 UTC
Created attachment 481726 [details]
package.use

I've attached my make.conf and package.use. Hope it helps.
Comment 11 Benda Xu gentoo-dev 2017-07-09 05:07:42 UTC
what is your `emerge -pv curl`?
Comment 12 Gábor VIDA 2017-07-09 19:28:12 UTC
$ 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.
Comment 13 Benda Xu gentoo-dev 2017-08-24 07:09:53 UTC
I can reproduce this bug now with your USE flags.  Part of -I/usr/inlucde comes from pkg-config librtmp --cflags.
Comment 14 Benda Xu gentoo-dev 2017-08-24 07:14:52 UTC
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
Comment 15 Benda Xu gentoo-dev 2017-08-24 07:26:17 UTC
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.
Comment 16 Gábor VIDA 2017-08-28 13:08:14 UTC
Thank you! It works now as you wrote.