From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: 40205@debbugs.gnu.org
Subject: bug#40205: 28.0.50; 32bit or LTO movemail build fails on macOS
Date: Tue, 24 Mar 2020 12:14:11 +0900 [thread overview]
Message-ID: <wllfnqo35o.wl-mituharu@math.s.chiba-u.ac.jp> (raw)
On macOS, movemail cannot be built with CC='cc -arch i386':
CCLD movemail
Undefined symbols for architecture i386:
"_rpl_getopt$UNIX2003", referenced from:
_main in movemail-1f1ea0.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [movemail] Error 1
make: *** [lib-src] Error 2
This is due to the following part in the system getopt.h:
#ifndef _GETOPT
#define _GETOPT
int getopt(int, char * const [], const char *) __DARWIN_ALIAS(getopt);
extern char *optarg; /* getopt(3) external variables */
extern int optind, opterr, optopt;
#endif
which is expanded to:
int rpl_getopt(int, char * const [], const char *) __asm("_" "rpl_getopt" "$UNIX2003");
extern char *rpl_optarg;
extern int rpl_optind, rpl_opterr, rpl_optopt;
I think the Gnulib getopt does not expect the __asm line above.
64-bit LTO build with CC='cc -flto' fails, too.
CCLD movemail
ld: reference to symbol (which has not been assigned an address) _rpl_getopt in '_main' from /var/folders/69/m7h39yv92g70qy7p3xdlghdm0000gn/T/cc-907a5d.o for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [movemail] Error 1
make: *** [lib-src] Error 2
YAMAMOTO Mitsuharu
mituharu@math.s.chiba-u.ac.jp
next reply other threads:[~2020-03-24 3:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-24 3:14 YAMAMOTO Mitsuharu [this message]
2020-03-25 2:58 ` bug#40205: 32bit or LTO movemail build fails on macOS Paul Eggert
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wllfnqo35o.wl-mituharu@math.s.chiba-u.ac.jp \
--to=mituharu@math.s.chiba-u.ac.jp \
--cc=40205@debbugs.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).