Unable to compile on centos 7.4 : error: expected ‘,’ or ‘;’ before ‘typedef’

Issues related to applications and software problems
darksniperx
Posts: 8
Joined: 2017/10/10 16:09:26

Re: Unable to compile on centos 7.4 : error: expected ‘,’ or ‘;’ before ‘typedef’

Post by darksniperx » 2017/10/10 19:29:36

which gcc: /usr/bin/gcc

Do you have a clean 7.4 or upgrade from existing 7.3?

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Unable to compile on centos 7.4 : error: expected ‘,’ or ‘;’ before ‘typedef’

Post by avij » 2017/10/10 19:56:11

darksniperx wrote:which gcc: /usr/bin/gcc

Do you have a clean 7.4 or upgrade from existing 7.3?
I had installed that machine years ago, but I updated that machine to 7.4.1708 a few weeks ago.

Now I did a totally fresh 7.4.1708 installation from minimal.iso, then ran "yum update", rebooted and installed the following packages and their dependencies: gcc make wget bzip2 nasm

Then extracted the tarball, ran ./configure and make => worked OK. I don't know why this doesn't work for you.

User avatar
TrevorH
Site Admin
Posts: 33220
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Unable to compile on centos 7.4 : error: expected ‘,’ or ‘;’ before ‘typedef’

Post by TrevorH » 2017/10/10 21:09:23

I'd say this looks like something is overriding typedef with an invalid definition or something...
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

darksniperx
Posts: 8
Joined: 2017/10/10 16:09:26

Re: Unable to compile on centos 7.4 : error: expected ‘,’ or ‘;’ before ‘typedef’

Post by darksniperx » 2017/10/10 21:52:37

any leads on where i could look at to find out?

User avatar
TrevorH
Site Admin
Posts: 33220
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Unable to compile on centos 7.4 : error: expected ‘,’ or ‘;’ before ‘typedef’

Post by TrevorH » 2017/10/10 22:36:22

Since it appears to work for others using the same code, I'd say this is probably something else you've installed on your machine.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

pjsr2
Posts: 614
Joined: 2014/03/27 20:11:07

Re: Unable to compile on centos 7.4 : error: expected ‘,’ or ‘;’ before ‘typedef’

Post by pjsr2 » 2017/10/11 13:39:51

You can add the option "-E" to all other options in the gcc compilation comand. This writes the results of the preprocessor to stdout. Send this output to a file.
Locate the offending line with the float_t typedef. Now work your way up in the file and try to figure out what the incomplete statement is before this point that is causing the error message.
Also look at the lines that start with a '#' as these contain the names of included files. Check the file names to see if any of these is picked up from an unexpected location. Use rpm to check to which package the files belong and let rpm verify the contents of each of the files.

Post Reply