Bug 4812 - sudoku-savant fails at 'make': 'cstdlib: No such file or directory'
Summary: sudoku-savant fails at 'make': 'cstdlib: No such file or directory'
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.5
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 1.5
Assignee: Khem Raj
QA Contact:
URL:
Whiteboard:
: 4829 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-04 11:44 UTC by Stoicescu Cornel
Modified: 2013-10-01 14:26 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stoicescu Cornel 2013-07-04 11:44:28 UTC
STATUS: FAILED
BUILD: master:eaa5df34af42b6a37f6506847d0f3ef6ba0d298a
ENVIRONMENT: qemux86-64
STEPS TO REPRODUCE: 1. Download sudoku-savant project from http://downloads.sourceforge.net/project/sudoku-savant/sudoku-savant/sudoku-savant-1.3/sudoku-savant-1.3.tar.bz2
2. Copy sudoku-savant tarball into sdk image
3. Extract the tarball and do "configure", "make"

EXPECTED OUTCOME: sudoku-savant could be compiled successfully .

ACTUAL OUTCOME: 
"
root@qemux86-64:~/sudoku-savant-1.3# make
make  all-recursive
make[1]: Entering directory `/home/root/sudoku-savant-1.3'
Making all in src
make[2]: Entering directory `/home/root/sudoku-savant-1.3/src'
g++ -DHAVE_CONFIG_H -I. -I.. -DPACKAGE_DATA_DIR=\""/usr/local/share"\" -DPACKAGE_LOCALE_DIR=\""/usr/local/share/locale"\" -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2    -frepo -fno-implement-inlines -ansi -pedantic -pipe -Wall -Winline -Wshadow -Wsign-compare -Woverloaded-virtual -Wextra --param max-inline-insns-single=400 -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.cpp
main.cpp:10:19: fatal error: cstdlib: No such file or directory
 #include <cstdlib>
                   ^
compilation terminated.

"

NOTE: Reproduced for BSP targets and QEMU targets on sato-sdk and lsb-sdk images.
Comment 1 Ke Zou 2013-07-08 06:44:19 UTC
Same thing happened when I tried to do a simple compiler test on MPC8315e
BUILD: master:eaa5df34af42b6a37f6506847d0f3ef6ba0d298a
Target: mpc8315e

root@mpc8315e-rdb:/opt/tests/compilers# gcc -c cpp_test.cpp 
cpp_test.cpp:3:20: fatal error: iostream: No such file or directory
 #include <iostream>
                    ^
compilation terminated.
root@mpc8315e-rdb:/opt/tests/compilers# find /usr/include -name iostream
/usr/include/c++/iostream
root@mpc8315e-rdb:/opt/tests/compilers# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/gcc/powerpc-poky-linux/4.8.1/lto-wrapper
Target: powerpc-poky-linux
Configured with: /srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-ppc/build/build/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/configure --build=x86_64-linux --host=powerpc-poky-linux --target=powerpc-poky-linux --prefix=/usr --exec_prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib/gcc --datadir=/usr/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --oldincludedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-ppc/build/build/tmp/sysroots/mpc8315e-rdb --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=powerpc-poky-linux- --without-local-prefix --enable-lto --enable-libssp --disable-bootstrap --disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --with-float=soft --with-sysroot=/ --with-build-sysroot=/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-ppc/build/build/tmp/sysroots/mpc8315e-rdb --with-native-system-header-dir=/srv/home/pokybuild/yocto-autobuilder-new/yocto-slave/nightly-ppc/build/build/tmp/sysroots/mpc8315e-rdb/usr/include --with-gxx-include-dir=/usr/include/c++/ --enable-dependency-tracking --enable-targets=powerpc64 --enable-nls --enable-__cxa_atexit --with-long-double-128
Thread model: posix
gcc version 4.8.1 (GCC) 










But using gcc (version 4.7.2) doesn't has this problem.
It looks like that gcc didn't look for header files from /usr/include/c++, which means "--with-gxx-include-dir=/usr/include/c++/" doesn't work.

This should be the same problem that Stoicescu Cornel encountered.
Comment 2 Ke Zou 2013-07-08 07:22:51 UTC
Plus, if I specify header dir with -I /usr/include/c++,  compiling is OK.
Comment 3 Saul Wold 2013-07-09 16:42:42 UTC
This looks like a configuration issue with the target gcc missing some setup.
Comment 4 Saul Wold 2013-07-09 16:52:31 UTC
*** Bug 4829 has been marked as a duplicate of this bug. ***
Comment 5 Khem Raj 2013-07-09 17:02:11 UTC
sometimes applications use precompiled headers and can end up in such issues.
Can you try to compile a simple c++ program like helloworld and see it it can
find the headers ?

something like

#include <iostream>
#include <cstdlib>

int main()
{
    std::cout << "Hello, World!" << std::endl;
}

if that compiles then we do not have issue with gcc.
Comment 6 Saul Wold 2013-07-09 20:42:04 UTC
It indeed fails with the same error.
Comment 7 Khem Raj 2013-07-15 23:44:01 UTC
Patch is posted here

http://lists.openembedded.org/pipermail/openembedded-core/2013-July/081311.html

Please test it out in your environment.
Comment 9 Stoicescu Cornel 2013-10-01 14:26:14 UTC
This issue is not present in latest 1.5 M5 RC5 build. Setting to VERIFIED for:
poky master:4d8ab87d25ea6e59dc88375813ef88ee0ac813d0