cant compile native gcc /usr/include/linux/errno.h:4:23: fatal error: asm/errno.h: No such file or directory"

Bug #825574 reported by Khem Raj
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gcc-defaults (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I tried to compile upstream gcc natively

/b/foss/gcc/configure --enable-languages=c,c++ --disable-nls --enable-bootstrap --target=x86_64-linux-gnu --build=x86_64-linux-gnu --host=x86_64-linux-gnu

make

It ends up with
make[5]: *** [_ashrdi3.o] Error 1
In file included from /usr/include/bits/errno.h:25:0,
                 from /usr/include/errno.h:36,
                 from /b/foss/gcc/libgcc/../gcc/tsystem.h:94,
                 from /b/foss/gcc/libgcc/../gcc/libgcc2.c:29:
/usr/include/linux/errno.h:4:23: fatal error: asm/errno.h: No such file or directory
compilation terminated.
make[5]: *** [_ashldi3.o] Error 1
In file included from /usr/include/bits/errno.h:25:0,
                 from /usr/include/errno.h:36,
                 from /b/foss/gcc/libgcc/../gcc/tsystem.h:94,
                 from /b/foss/gcc/libgcc/../gcc/libgcc2.c:29:
/usr/include/linux/errno.h:4:23: fatal error: asm/errno.h: No such file or directory
compilation terminated.

Changed in gcc-defaults (Ubuntu):
status: New → Confirmed
Revision history for this message
Khem Raj (khem-raj) wrote :

After todays updates I am getting

/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
make[3]: *** [libgcc_s.so] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/tmp/gcc/x86_64-unknown-linux-gnu/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/tmp/gcc'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/tmp/gcc'
make: *** [all] Error 2

Revision history for this message
youngsai (10equals2) wrote :

Finally figured it out!

basically, /usr/include/asm was renamed to /usr/include/asm-generic
and whoever did it was a snotty brat!

He only told half of the header files that he made the change!
the Half of the header files were looking but they couldn't find their friend...

Trying to tear apart the header files like that.... tsk tsk..

Sorry, I'm really high.
Basically, make a symlink from /usr/include/asm to /usr/include/asm-generic

It fixes everything.
Also I'm pretty sure that the problem lies in one of the multilib packages not creating this symlink.
probably gcc-multilib. Or something. Again, really high.

It shouldn't be a hard fix.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.