This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

some problems when build gcc from source

I build gcc from source sometime yesterday. Everything seem OK during the build process and I install it in my /home/xxx/opt/   without root.

But when I try to use it to compile my function, an error was told like:

     'aligned_alloc' was not defined in this scope

After some search on the Internet I find it is a new feature in C++11 and may be in 'stdlib.h'.

I'm quite sure I included this  in my cpp file. and of course get the -std=c++14 option when build my code.

Curiously I searched my /home/xxx/opt directory and find few 'stdlib.h' file but all not contain useful code, there are just some usings. I think it's not right.

So I am confused that if there are some operations I missed for this or I just didnt use it in appropriate way. and how I get an 'stdlib.h' that contains 'aligned_alloc'.

my info:

centOS 6 (no root privillage)

previous GCC : 4.4.7

target GCC : 5.3.0/5.5.0 (I tried both and get same situation)

I installed gmp mpfr mpc all from source in the same directory above. and no error reported

LD_LIBRARY_PATH and some other path are set too.

It seems my new GCC can be use in some place. I tried to build a python3 from source and get a success.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]