public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mario_grgic at hotmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105599] New: g++ binary: undefined symbols _main referenced from __start in crt1.0 Date: Fri, 13 May 2022 21:06:29 +0000 [thread overview] Message-ID: <bug-105599-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105599 Bug ID: 105599 Summary: g++ binary: undefined symbols _main referenced from __start in crt1.0 Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mario_grgic at hotmail dot com Target Milestone: --- I have compiled gcc 12.1.0 from source on macOS 10.15.7 (Catalina) with XCode 12.1. I used the following configuration: ``` ../configure --prefix=/usr/local --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --with-isl-prefix=/usr/local --with-cloog=/usr/local --enable-checking=release --enable-languages=c,c++,fortran --with-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk --with-system-zlib --with-zsstd=/usr/local --disable-multilib --disable-nls ``` Everything builds and installs correctly. gcc and other binaries work, however invoking g++ without any arguments produces ``` $ /usr/local/bin/g++ Undefined symbols for architecture x86_64: "_main", referenced from: __start in crt1.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status ``` Note that g++ works correctly and compiles and produces working binaries when invoked with correct arguments. Similar thing happens with c++ binary.
next reply other threads:[~2022-05-13 21:06 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-13 21:06 mario_grgic at hotmail dot com [this message] 2022-05-13 22:05 ` [Bug target/105599] g++ by itself is not producing "fatal error: no input files" for darwin target pinskia at gcc dot gnu.org 2022-05-13 22:21 ` iains at gcc dot gnu.org 2022-05-13 23:03 ` iains at gcc dot gnu.org 2022-05-29 18:27 ` cvs-commit at gcc dot gnu.org 2022-06-15 19:07 ` cvs-commit at gcc dot gnu.org 2022-06-15 19:09 ` iains at gcc dot gnu.org 2023-05-16 19:01 ` cvs-commit at gcc dot gnu.org 2023-05-16 19:10 ` iains at gcc dot gnu.org 2024-04-24 18:36 ` cvs-commit at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-105599-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).