Can't build gcc 7 or 8 on Fedora 28
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2018
    Location
    Tokyo Japan
    Posts
    21

    Can't build gcc 7 or 8 on Fedora 28

    Now just before releasing F28, I upgraded my F27 to F28.

    I was amazed to see gcc-7 or gcc-8 (downloaded by git from gnu-gcc repository) couldn't be built on F28. Looks like it's due to glibc-2.27, but why? Will anyone tell me how to resolve this?

    gcc-8 coming with F28 is not matured, and the latest doesn't compile Linux generic kernel as far as I tested on F27. So I want to compile gcc-8 to catch up with the latest gcc and gcc-7 (to compile kernel). gcc development group has made a branch for gcc-8 and now is developing gcc-9!

    The unusual error message during build is as follows. Thanks in advance!
    Code:
    checking for egrep... /usr/bin/grep -E
    checking for ANSI C header files... no
    checking for sys/types.h... no
    checking for sys/stat.h... no
    checking for stdlib.h... no
    checking for string.h... no
    checking for memory.h... no
    checking for strings.h... no
    checking for inttypes.h... no
    checking for stdint.h... no
    checking for unistd.h... no
    checking minix/config.h usability... no
    checking minix/config.h presence... no
    checking for minix/config.h... no
    checking whether it is safe to define __EXTENSIONS__... no
    checking how to run the C preprocessor... gcc -E
    checking for inline... no
    checking for special C compiler options needed for large files... no
    checking for _FILE_OFFSET_BITS value needed for large files... unknown
    checking for _LARGE_FILES value needed for large files... unknown
    checking size of void *... 0
    checking size of short... 0
    checking size of int... 0
    checking size of long... 0
    checking for long long... no
    checking for int8_t... no
    checking for int16_t... no
    checking for int32_t... no
    checking for int64_t... no
    checking for long long int... no
    checking for intmax_t... no
    checking for intptr_t... no
    checking for uint8_t... no
    checking for uint16_t... no
    checking for uint32_t... no
    checking for uint64_t... no
    checking for unsigned long long int... no
    checking for uintmax_t... no
    checking for uintptr_t... no
    configure: error: uint64_t or int64_t not found
    make[1]: *** [Makefile:4155: configure-gcc] Error 1
    make[1]: Leaving directory '/home/tetsuji/work/gcc/build'
    make: *** [Makefile:878: all] Error 2
    Last edited by maverick6664; 26th April 2018 at 02:03 AM.

  2. #2
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    2,971

    Re: Can't build gcc 7 or 8 on Fedora 28

    I think the files you need are in the glibc-headers package.
    These would normally be installed with the C development tools.
    Code:
    sudo dnf group install "Development Tools" "C Development Tools and Libraries"

    User error. Please replace user and try again

  3. #3
    Join Date
    Feb 2018
    Location
    Tokyo Japan
    Posts
    21

    Re: Can't build gcc 7 or 8 on Fedora 28

    Thanks, but I have already installed them all.

    But I seem to have solved it by myself. I downloaded the latest glibc git and compiled and installed it. Then I have no errors compiling gcc so far (now I'm compiling ) Looks like glibc coming with F28 is older compared with gcc although glibc's versions are both 2.27. There are variants in glibc-2.27.
    Last edited by maverick6664; 26th April 2018 at 03:24 AM.

  4. #4
    Join Date
    Oct 2010
    Location
    Canberra
    Posts
    2,971

    Re: Can't build gcc 7 or 8 on Fedora 28

    Good to hear you got over that problem.
    To find out what the problem was you could have a look around in the configure scripts.

    User error. Please replace user and try again

  5. #5
    Join Date
    Feb 2018
    Location
    Tokyo Japan
    Posts
    21

    Re: Can't build gcc 7 or 8 on Fedora 28

    The reason why I want to compile gcc-8 and 7 is that the recent gcc-8 cannot compile linux kernel. Only old gcc-8 (maybe older than April 1st or so) can compile linux kernel. So F28 has old gcc 8.0.1.

  6. #6
    Join Date
    Feb 2005
    Location
    London, UK
    Posts
    688

    Re: Can't build gcc 7 or 8 on Fedora 28

    Quote Originally Posted by ocratato
    Good to hear you got over that problem.
    To find out what the problem was you could have a look around in the configure scripts.
    The configure script should create a "config.log" file which would be more useful than looking in the actual script. If you search up from the bottom of the log for the error message you should see exactly what is being tested for, e.g: the full pkgconfig command or the actual temporary code and gcc command being used.

    Another useful tool is running "V=1 VERBOSE=1 make" if you encounter an error during make, quite often you can see what the gcc command is (taking in to account the working directory from the "leaving directory" line) and run it to see what the errors are, sometimes it's as simple as a missing "-I/path" or "-lLib" which you can either add for that one command or add to the relevant CFLAGS/CPPFLAGS variable etc.

  7. #7
    Join Date
    Feb 2018
    Location
    Tokyo Japan
    Posts
    21

    Re: Can't build gcc 7 or 8 on Fedora 28

    Incredible!

    Now I clean installed F28 and compiled gcc-7.3.1 (from git) and it didn't give any errors! Good omen. What's different? I lost the previous results, so I cannot tell.... anyway, it's no longer a problem. I can live with gcc-7 and gcc-8 (and if necessary, gcc-9 is under development.) I don't have to compile glibc!
    Last edited by maverick6664; 26th April 2018 at 01:09 PM.

  8. #8
    Join Date
    Jun 2005
    Location
    Montreal, Que, Canada
    Posts
    5,294

    Re: Can't build gcc 7 or 8 on Fedora 28

    If you installed F28 then you will be running gcc 8.x
    To be sure enter gcc -v

    Run Sudo dnf group list to look at the groups. For missing Development groups, run Sudo dnf group install groupxxxx.

    Where groupxxxx is the group name presented within quotes.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840

  9. #9
    Join Date
    Feb 2018
    Location
    Tokyo Japan
    Posts
    21

    Re: Can't build gcc 7 or 8 on Fedora 28

    Wow, current gcc-8 can compile linux kernel!

    It sounds strange, but a week or so ago, it's impossible. It gave a lot of errors and aborted. As I wrote, gcc coming with F28 is old. You will see "experimental" when you invoke "gcc -v". After that "black era" came; gcc-8 couldn't compile generic kernel. Now the current status (git version) is
    Code:
    gcc version 8.0.1 20180427 (prerelease) (GCC)
    . And now it can compile generic kernels with a few warnings! I don't have to worry about gcc-7.
    Last edited by maverick6664; 28th April 2018 at 12:24 AM.

  10. #10
    Join Date
    Feb 2018
    Location
    Tokyo Japan
    Posts
    21

    Re: Can't build gcc 7 or 8 on Fedora 28

    Today, I tried to compile another kernel with gcc renewed, but I found today's gcc 8.0.1 cannot build linux kernel (4.16.5). It gave a lot of warnings, and at last gave an error and failed to compile! I had to make gcc 7.3.1 again.... I wonder F28 will come with immature gcc-8.0.1 to compile kernel?

Similar Threads

  1. [SOLVED]
    Build error with Fedora 16 - thoggen - dependency build error - hal?
    By jonathonp in forum Using Fedora
    Replies: 4
    Last Post: 17th November 2011, 08:59 AM
  2. Trying to build pcsx2 - errors during build
    By Witgetsteinsbee in forum Using Fedora
    Replies: 2
    Last Post: 29th March 2011, 11:30 PM
  3. How to build gcc-4.1 RPM for Fedora 10
    By rodgers in forum Using Fedora
    Replies: 1
    Last Post: 28th February 2009, 04:49 PM
  4. is there anything like apt-build in fedora?
    By Effie04 in forum Installation, Upgrades and Live Media
    Replies: 10
    Last Post: 25th May 2006, 04:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •