Hmm, I just realized, that the command is g++, not gcc...I exported the gcc library path into LD_LIBRARY_PATH (at /lib64) but that didn't help either. On Wed, Jun 24, 2015 at 3:09 PM, Siddhartha Jain <tmfs10@xxxxxxxxx> wrote: > The command is below. C_INCLUDE_PATH and CXX are empty. I have a > symlink to the gcc exec in my home dir bin which is what's running. > > When I set the CXX and CC to the system g++ and gcc, the problem goes > away so it seems like my gcc custom installation is messed up? I have > compiled other things in the past with it though. > > g++ -c -o project.o -pipe -DQMAKE_OPENSOURCE_EDITION -g -I. > -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac > -Igenerators/symbian -Igenerators/integrity > -I/home/sj1/Software/qt/4.8.7/build/include > -I/home/sj1/Software/qt/4.8.7/build/include/QtCore > -I/home/sj1/Software/qt/4.8.7/build/src/corelib/global > -I/home/sj1/Software/qt/4.8.7/build/src/corelib/xml > -I/home/sj1/Software/qt/4.8.7/qt-everywhere-opensource-src-4.8.7/tools/shared > -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED > -DQLIBRARYINFO_EPOCROOT -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES > -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS > -I/home/sj1/Software/qt/4.8.7/qt-everywhere-opensource-src-4.8.7/mkspecs/linux-g++ > -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT > -DQT_NO_DEPRECATED project.cpp > > On Wed, Jun 24, 2015 at 2:56 PM, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: >> On 24 June 2015 at 19:38, Siddhartha Jain wrote: >>> /usr/include/string.h:548:5: error: ‘__locale_t’ has not been declared >>> __locale_t __loc) >> >> This indicates you are either doing something wrong or your C library >> is severely messed up. >> >> /usr/include/string.h is part of the C library, and the type >> __locale_t should be defined by another header in the C library, >> /usr/include/xlocale.h >> >> >>> there are a couple of other similar errors but this is the first one >>> and I thought it might be because the system gcc is 4.4.7 and it's >>> using the executable for gcc 4.8.1 >> >> No, that should work fine (and it does, I use such a setup frequently). >> >> I suggest you stop adding anything to C_INCLUDE_PATH. If you just >> invoke gcc 4.8.1 it should know how to find all the standard C and C++ >> headers it needs, without your help. >> >> If that still doesn't work and you want further help you will need to >> show the exact gcc or g++ command that causes the error, as well as >> any environment variables such as C_INCLUDE_PATH and CXX that you >> might have set that would confuse things. We can't guess what the >> problem is if you don't tell us exactly what you're doing.