26.1: build on macOS failed

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

26.1: build on macOS failed

Zhang Haijun
OS: macOS 10.13.6
Xcode: 10.1

Configuration:
CFLAGS="-O2" ./configure --without-makeinfo --with-ns --with-modules

Error message of make:

...
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C lib-src all
  CC       regex.o
  CCLD     etags
ld: warning: ignoring file ../lib/libgnu.a, file was built for archive which is not th
e architecture being linked (x86_64): ../lib/libgnu.a
Undefined symbols for architecture x86_64:
  "_c_isalnum", referenced from:
      _Asm_labels in etags-59ad2c.o
      _Cobol_paragraphs in etags-59ad2c.o
      _Erlang_functions in etags-59ad2c.o
      _Perl_functions in etags-59ad2c.o
      _Prolog_functions in etags-59ad2c.o
      _Ruby_functions in etags-59ad2c.o
      _Ada_getit in etags-59ad2c.o
      ...
  "_c_strcasecmp", referenced from:
      _get_language_from_filename in etags-59ad2c.o
  "_c_strncasecmp", referenced from:
      _Forth_words in etags-59ad2c.o
      _Fortran_functions in etags-59ad2c.o
      _HTML_labels in etags-59ad2c.o
  "_rpl_getopt_long", referenced from:
      _main in etags-59ad2c.o
  "_rpl_optarg", referenced from:
      _main in etags-59ad2c.o
  "_rpl_optind", referenced from:
      _main in etags-59ad2c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [etags] Error 1
make: *** [lib-src] Error 2

Reply | Threaded
Open this post in threaded view
|

Re: 26.1: build on macOS failed

Charles A. Roelli
> From: Zhang Haijun <[hidden email]>
> Date: Sat, 9 Feb 2019 13:07:40 +0000
>
> OS: macOS 10.13.6
> Xcode: 10.1
>
> Configuration:
> CFLAGS="-O2" ./configure --without-makeinfo --with-ns --with-modules
>
> Error message of make:
>
> ...
> /Applications/Xcode.app/Contents/Developer/usr/bin/make -C lib-src all
>   CC       regex.o
>   CCLD     etags
> ld: warning: ignoring file ../lib/libgnu.a, file was built for archive which is not th
> e architecture being linked (x86_64): ../lib/libgnu.a
> Undefined symbols for architecture x86_64:
>   "_c_isalnum", referenced from:
>       _Asm_labels in etags-59ad2c.o
>       _Cobol_paragraphs in etags-59ad2c.o
>       _Erlang_functions in etags-59ad2c.o
>       _Perl_functions in etags-59ad2c.o
>       _Prolog_functions in etags-59ad2c.o
>       _Ruby_functions in etags-59ad2c.o
>       _Ada_getit in etags-59ad2c.o
>       ...
>   "_c_strcasecmp", referenced from:
>       _get_language_from_filename in etags-59ad2c.o
>   "_c_strncasecmp", referenced from:
>       _Forth_words in etags-59ad2c.o
>       _Fortran_functions in etags-59ad2c.o
>       _HTML_labels in etags-59ad2c.o
>   "_rpl_getopt_long", referenced from:
>       _main in etags-59ad2c.o
>   "_rpl_optarg", referenced from:
>       _main in etags-59ad2c.o
>   "_rpl_optind", referenced from:
>       _main in etags-59ad2c.o
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> make[1]: *** [etags] Error 1
> make: *** [lib-src] Error 2

I can't produce this locally.  Can you please show the output of "make
V=1"?  Also, does the same issue occur in the latest pretest of Emacs
(26.1.91)?

Reply | Threaded
Open this post in threaded view
|

Re: 26.1: build on macOS failed

Charles A. Roelli
Other people have had similar issues on macOS when using the "ar" tool
provided by a different compilation toolchain (from GCC, for example).
Can you try specifying by hand the name of the correct "ar" tool, as
in the following?

rm -f lib/libgnu.a && make AR=/name/of/ar V=1