Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 623840 - media-gfx/opencsg-1.4.2 : /.../cstdlib:75:25: fatal error: stdlib.h: No such file or directory
Summary: media-gfx/opencsg-1.4.2 : /.../cstdlib:75:25: fatal error: stdlib.h: No such ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-6
  Show dependency tree
 
Reported: 2017-07-04 20:10 UTC by Toralf Förster
Modified: 2017-07-06 12:57 UTC (History)
2 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,14.90 KB, text/plain)
2017-07-04 20:10 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,105.71 KB, text/plain)
2017-07-04 20:10 UTC, Toralf Förster
Details
environment (environment,50.61 KB, text/plain)
2017-07-04 20:10 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,21.81 KB, application/x-bzip)
2017-07-04 20:10 UTC, Toralf Förster
Details
media-gfx:opencsg-1.4.2:20170704-200755.log (media-gfx:opencsg-1.4.2:20170704-200755.log,3.11 KB, text/plain)
2017-07-04 20:10 UTC, Toralf Förster
Details
opencsg-1.4.2-includepath.patch (opencsg-1.4.2-includepath.patch,533 bytes, patch)
2017-07-05 03:49 UTC, maurerpe
Details | Diff
opencsg-1.4.2-r1.ebuild (opencsg-1.4.2-r100.ebuild,891 bytes, text/plain)
2017-07-05 03:50 UTC, maurerpe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2017-07-04 20:10:39 UTC
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/g++-v6/map:61,
                 from context.cpp:30:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/g++-v6/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
                         ^
compilation terminated.

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 13.0-desktop-plasma_20170701-124433

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-6.3.0 *

Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby21 (with Rubygems)
  [2]   ruby22 (with Rubygems) *
java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.4.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm
Comment 1 Toralf Förster gentoo-dev 2017-07-04 20:10:42 UTC
Created attachment 480778 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-07-04 20:10:45 UTC
Created attachment 480780 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2017-07-04 20:10:48 UTC
Created attachment 480782 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2017-07-04 20:10:51 UTC
Created attachment 480784 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2017-07-04 20:10:55 UTC
Created attachment 480786 [details]
media-gfx:opencsg-1.4.2:20170704-200755.log
Comment 6 maurerpe 2017-07-05 03:49:55 UTC
Created attachment 480818 [details, diff]
opencsg-1.4.2-includepath.patch

I ran into this as well.  It seems to be specific to gcc-6.  The issue that the compile command explicitly includes '-isystem /usr/include' which includes a version of stdlib.h that isn't the correct one.  The correct one is buried in a compiler specific subdirectory.  Normally the compiler specific subdirecty is searched first, but by putting /usr/include explicitly in the include path it breaks the build.

This patch fixes the issue and also resolves a similar one: it refers to /usr/lib explicitly instead of /usr/$(get_libdir), which could cause problems on multilib systems.  I fixed this at the same time.

I got the idea from this post:
https://blog.argcv.com/articles/4655.c
Comment 7 maurerpe 2017-07-05 03:50:57 UTC
Created attachment 480820 [details]
opencsg-1.4.2-r1.ebuild

ebuild that applies the above patch and also passes LIBDIR as $(get_libdir).
Comment 8 Michael Palimaka (kensington) gentoo-dev 2017-07-06 12:57:19 UTC
Thanks, fixed in git.

I skipped the revision bump because it fixes a build-only issue.

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfbc1b4b7a8ad01f03defd04329140d5bb1e1a9e