Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 623840

Summary: media-gfx/opencsg-1.4.2 : /.../cstdlib:75:25: fatal error: stdlib.h: No such file or directory
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: normal CC: jouni.kosonen, junk4me46806
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 582084    
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tbz2
media-gfx:opencsg-1.4.2:20170704-200755.log
opencsg-1.4.2-includepath.patch
opencsg-1.4.2-r1.ebuild

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