Error occurred while building GCC 4.9
#1
Sat, 2017-04-08 20:46
asgeek
-
- Offline
- 11 months 2 weeks ago
- 2017-04-08
I tried to build GCC 4.9 on Alpine Linux. Before that I have installed all the required packages from apk tool. I have installed alpine-sdk, m4, libelf, automake, autoconf, perl. Whine building GCC I got this error
cfns.gperf:101:1: error: 'const char* libc_name_p(const char*, unsigned int)' redeclared inline with 'gnu_inline'
After googling the error what I found is, this error is occurred due to trying build GCC 4 with GCC 5. As many forums said, we must use GCC 4 or older version to build GCC 4.9. I have tried many ways to find GCC 4 or older version to install on alpine. But I couldn't find any. I would be really grateful if someone could suggest me a way to build GCC 4.9 on alpine linux.
Thanks in advance.
musl based gcc build, i have done that, may be you could find something useful here:
https://plan9assembler.wordpress.com/?s=musl&submit=Search
below links is much better than my site:
https://github.com/richfelker/musl-cross-make
https://github.com/GregorR/musl-cross
https://github.com/pikhq/bootstrap-linux
--
PS: oh forgot this, build gcc alpine linux style, abuild.
https://wiki.alpinelinux.org/wiki/Abuild_and_Helpers
https://wiki.alpinelinux.org/wiki/Developer_Documentation
@mmix Thank you for the answer! I went through the links. I am not an expert on this subject. Could you please explain little more about the method you have followed to build GCC 4.9.
Thanks in advance.
Thankyou for information.