Bug 100140 - Reference gcc development github mirror - Latest Development Build
Summary: Reference gcc development github mirror - Latest Development Build
Status: CLOSED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 11.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-19 04:52 UTC by Jignesh
Modified: 2021-04-19 10:28 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jignesh 2021-04-19 04:52:05 UTC
Dear sir

Posting as under:

Used ../configure --enable-multilib and then make -s from build directory created inside source downloaded from https://github.com/gcc-mirror/gcc/commit/d64720a07f611c55e8c815c775a852d650a2e738 (link of latest GCC administrator bump on GCC development github mirror)

I am reproducing the comment posted there which gives entire details required for bug tracking and resolving. Unfortunately, no developers are responding to my messages on Github development builds since last 2 days hence posting here:

Posted as under on Github: 

Dear sir

As conveyed earlier - even after latest daily bump, the following error while using ../configure --enable-multilib followed by make -s persists. Request you and entire community of developers to look into - I am not a developer myself otherwise I could look into this and resolve myself and would have posted pull request to be merged instead of requesting again and again. Facing this make -s error since last 3 days. As I have personal interest in testing new development of GCC 11 version (although not a developer and also not knowing much about C and C++) - I am daily testing after changes. Error copied from terminal screen is as under:

113 | "~" |
| ^~~~~~~~
gengtype-lex.c:365:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
365 | #define YY_DO_BEFORE_ACTION
| ~~~~~~~~~~~~~^~~~~~~
../../gcc/gengtype-lex.l:138:1: note: in expansion of macro ‘YY_DO_BEFORE_ACTION’
138 | ;
| ^ ~
../../gcc/gengtype-lex.l:134:1: note: here
134 | "ENUM_BITFIELD"{WS}?"("{WS}?{ID}{WS}?")" {
| ^~~~
/usr/local/x86_64-pc-linux-gnu/bin/ld: /home/admin/Downloads/gcc_18042021_1708hrs_IST/build/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.a(guard.o): in function __gnu_cxx::__is_single_threaded()': /home/admin/Downloads/gcc_18042021_1708hrs_IST/build/x86_64-pc-linux-gnu/libstdc++-v3/include/ext/atomicity.h:52: undefined reference to __libc_single_threaded'
/usr/local/x86_64-pc-linux-gnu/bin/ld: /home/admin/Downloads/gcc_18042021_1708hrs_IST/build/x86_64-pc-linux-gnu/libstdc++-v3/include/ext/atomicity.h:52: undefined reference to __libc_single_threaded' /usr/local/x86_64-pc-linux-gnu/bin/ld: /home/admin/Downloads/gcc_18042021_1708hrs_IST/build/x86_64-pc-linux-gnu/libstdc++-v3/include/ext/atomicity.h:52: undefined reference to __libc_single_threaded'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:3008: build/genpreds] Error 1
make[2]: *** [Makefile:4822: all-stage2-gcc] Error 2
make[1]: *** [Makefile:25993: stage2-bubble] Error 2
make: *** [Makefile:1001: all] Error 2

My OS details: OS - AlmaLinux 8.3 x86_64 - kernel - 5.11.11-1.el8.elrepo.x86_64

Current stable GCC version details from terminal screen:

[root@admin build]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/10.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --enable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.3.0 (GCC)

Once again requesting all to look into. 

Thank you in advance.

Regards,
Comment 1 Jakub Jelinek 2021-04-19 08:34:41 UTC
What glibc you are using?
libstdc++ refers to __libc_single_threaded only with
#elif __has_include(<sys/single_threaded.h>)
    return ::__libc_single_threaded;
#else
and the sys/single_threaded.h header has been added in Glibc 2.32 together with the __libc_single_threaded symbol.
So, are you doing a native build or cross-compilation (without sysroot?)?
Do you have some unrelated sys/single_threaded.h header around, or are compiling against glibc 2.32+ headers and linking against glibc 2.31 or earlier?
Comment 2 Jonathan Wakely 2021-04-19 08:59:24 UTC
(In reply to Jignesh from comment #0)
> I am reproducing the comment posted there which gives entire details
> required for bug tracking and resolving. Unfortunately, no developers are
> responding to my messages on Github development builds since last 2 days
> hence posting here:

Because it's an unofficial mirror that has nothing to do with the GCC project. No GCC developers are involved in it and nobody reads anything there.
Comment 3 Jignesh 2021-04-19 09:20:05 UTC
Thank you for your responses

glibc version: 2.33.900 (developmental version installed from github) Source: git clone https://github.com/bminor/glibc.

As far as I understand - I am doing a native build. I first downloaded via command git clone https://github.com/gcc-mirror/gcc target_directory in terminal. Than in target directory I created build directory then - cd build, ../configure --enable-multilib followed by make -s and stopped at error.

Is this method a native build or cross compilation - sorry - but I cannot get that.

As written in another comment, which is the official source of getting the developmental version?

If I am doing something fundamentally wrong please let me know. I tried git build of around 12-04-2021 and it was very successful in make -s and then make install. So it seems that error has crept in after that by someone's pull request which has  this side effect (this is my thinking).

Thank you both of you again.

Regards,
Comment 4 Jignesh 2021-04-19 09:33:11 UTC
Again regarding glibc version:

through command ldd -version the output is 2.33.9000 while through following script it is 2.28:

Script for glibc version:

#include <stdio.h>
#include <stdlib.h>
#include <gnu/libc-version.h>

int main(int argc, char *argv[]) {
  printf("GNU libc version: %s\n", gnu_get_libc_version());
  exit(EXIT_SUCCESS);
}

Thank you.
Comment 5 Jignesh 2021-04-19 09:39:50 UTC
I think if I will compile using the new glibc version by pointing to the path of that glibc - perhaps the problem will be resolved - It seems that the system is compiling via 2.28 version while this single thread was corrected in 2.32. I will try doing that and post the results here.
Comment 6 Jignesh 2021-04-19 09:45:00 UTC
As per guidance somewhere I will need to change configure script CFLAGS and some other flag to point to new glibc. Can you please guide what and where I will have to change to recompile gcc developmental version successfully. My new libraries of glibc 2.33.9000 are at /usr/local/lib.

Thank you.
Comment 7 Jakub Jelinek 2021-04-19 09:50:28 UTC
Neither of these projects lives on github.
For glibc documentation see
https://www.gnu.org/software/libc/libc.html
sources should be grabbed from
https://www.gnu.org/software/libc/sources.html
but in the documentation you'll see (and configure warns loudly) that configuring glibc for prefix other than /usr is highly discouraged.
GCC has https://gcc.gnu.org home page with documentation and sources in
https://gcc.gnu.org/git/gcc.git

Anyway, this looks like a user error to me.
Comment 8 Jonathan Wakely 2021-04-19 09:58:32 UTC
Yes, you are trying to use a new version of glibc instead of the one in /usr but you are not doing that correctly. The GCC build is finding the new headers, but not the new libc.so that matches the headers.
Comment 9 Jignesh 2021-04-19 10:06:23 UTC
Thank you both of you for quick responses and pointing out my error. I will do the needful as suggested and then if find anything will post a new issue. I am closing the thread now. Thank you again with regards and best wishes.
Comment 10 Jignesh 2021-04-19 10:28:47 UTC
It was valuable insight for me - connection between gcc and glibc and how new version of glibc impacts gcc compilation.