The compilation of stm8-binutils is not working for me on ubuntu.
The patching and configuring step seem to work just fine, but the compilation with make fails.
I tried it with different gcc versions (4.8 and 7).
The compilation process with gcc7 runs considerably longer but eventually fails too (but with
a different error).
The error I obtain with gcc7: ser-tcp.c:64:13: error: conflicting declaration ‘typedef int socklen_t’
Last edit: Benno 2019-09-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The `-ansi' switch to the GNU C compiler, and standards conformanceoptionssuchas `-std=c99', define __STRICT_ANSI__. If none ofthesearedefined, orif_DEFAULT_SOURCEisdefined, thedefaultistohave_POSIX_SOURCEsettooneand_POSIX_C_SOURCEsetto200809L, aswellasenablingmiscellaneousfunctionsfromBSDandSVID. Ifmorethanoneofthesearedefined, theyaccumulate. Forexample__STRICT_ANSI__, _POSIX_SOURCEand_POSIX_C_SOURCEtogethergiveyouISOC, 1003.1, and1003.2, butnothingelse.
I think it could have something to do with what C++ standard is used. Check what standard your compiler is using or try supply CXX="g++ -std=gnu+11" to configure in "configure_binutils.sh"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
upd: sorry for disturb. Everything works. I just though it was incomplete or broken istallation due to such log :-)
Hi, @arehnman, I faild to compile the latest version of stm8-binutils-gdb (stm8-binutils-gdb-sources-2020-03-22) on Ubuntu 18 (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) ) . I tried it on 2 macines with Ubuntu version I mentioned about and on a machine with Xubuntu with gcc 5.4.
The tail of the make step log:
I also tried the previous versions and the compilation failed as well, but with slightly different log.
What direction should I move to succeed?
Thank you!
Last edit: Maxim 2020-07-23
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The compilation of stm8-binutils is not working for me on ubuntu.
The patching and configuring step seem to work just fine, but the compilation with make fails.
I tried it with different gcc versions (4.8 and 7).
The compilation process with gcc7 runs considerably longer but eventually fails too (but with
a different error).
The error I obtain with gcc7:
ser-tcp.c:64:13: error: conflicting declaration ‘typedef int socklen_t’
Last edit: Benno 2019-09-18
What is the rest of the error message saying?
Have you seen this?
https://stackoverflow.com/questions/52451352/why-gdb8-2-compile-error-on-centos7-aliyun
Yes, but i could not make much sense of it. It seems that configure assumes a different compiler version?
Stupid question but did you "make distclean" after changing compiler?
I removed the entire directory and run ran
patch_binutils.sh
andconfigure_binutils.sh
again before i called make with another compilerUpdate: I have the exact same problem on a centos machine (gcc 7.2)
Just compiled everything in ubutu gcc 5.4.0 without any problems.
I am not sure why compilation fails for you. Looking in /usr/include/unistd.h:
and __USE_MISC is defined in /usr/include/features.h:
I think it could have something to do with what C++ standard is used. Check what standard your compiler is using or try supply CXX="g++ -std=gnu+11" to configure in "configure_binutils.sh"
Neither specifiying CXX="g++ -std=gnu++1" nor using gcc-5-5 helped
I am out of ideas. You must have something funky going on with your build environment.
Could you post the command line for the failing ser-tcp.c source e.i "g++ .... ser-tcp.c" ?
I manually commented the typdef of socklen_t in the ser-tcp.c file which fixed this error but then the next error popped up
Last edit: Benno 2019-09-19
FYI I just recompiled everyting with gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0 without any problems.
I gave it another try today. Somehow I had prevent my shell from reading my bashrc when compiling. After that it worked.
upd: sorry for disturb. Everything works. I just though it was incomplete or broken istallation due to such log :-)
Hi, @arehnman, I faild to compile the latest version of stm8-binutils-gdb (stm8-binutils-gdb-sources-2020-03-22) on Ubuntu 18 (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) ) . I tried it on 2 macines with Ubuntu version I mentioned about and on a machine with Xubuntu with gcc 5.4.
The tail of the
make
step log:The intallation of the following didn't help:
I also tried the previous versions and the compilation failed as well, but with slightly different log.
What direction should I move to succeed?
Thank you!
Last edit: Maxim 2020-07-23
Was the problem resolved and what was the issue?
Yes, the problem was resolved (there was no a problem actually). I considered that the log of make I posted above is an error, but it's actually not.
Ok, I don't think make should fail though....
/Ake
On 2020-07-23 17:45, Maxim wrote:
I don't like seeing errors during make either.
I'm running Ubuntu 20.04 and to get the package to complile without errors, I had to:
I haven't run make install yet or actually tried to run anything so wish me luck!