compiling emacs-devel on Mac OS X Lion fails

Werner LEMBERG wl at gnu.org
Sun Jul 24 11:21:13 UTC 2022


>> The 'emacs-devel' package of MacPorts is currently based on commit
>> 4650ea9c25514831d925e5006ea0c3679344333b (from 2022-Jul-12).
>>
>> On Mac OS X 10.7.5 (Lion), emacs 27.2 builds fine.  However, the above
>> commit fails with
>>
>> ```
>> ./temacs --batch  -l loadup --temacs=pbootstrap \
>>          --bin-dest /opt/local/bin/ \
>>          --eln-dest /opt/local/lib/emacs/29.0.50/
>> Warning: arch-independent data dir
>>   '/opt/local/share/emacs/29.0.50/etc/': Invalid argument
>> Warning: Lisp directory
>>   '/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_editors_emacs/emacs-devel/work/emacs-20220712/lisp':
>>   Invalid argument
>> Error: /opt/local/share/emacs/29.0.50/etc/charsets: Invalid argument
>> Emacs will not function correctly without the character map files.
>> ```
> 
> What happens if you build without MacPorts, using the built-in
> Command Line Developer Tools instead?

Good idea!  Executing this script, which is based on the parameters
used in MacPorts' Portfile for 'emacs-devel',

```
./autogen.sh

CC=/usr/bin/clang \
CFLAGS='-pipe -Os -arch x86_64 -Wno-attributes' \
CPPFLAGS='-I/opt/local/include' \
LDFLAGS='-Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-no_pie -arch x86_64' \
./configure --disable-silent-rules \
            --without-ns \
            --without-x \
            --without-dbus \
            --without-gconf \
            --without-libotf \
            --without-m17n-flt \
            --with-libgmp \
            --with-gnutls \
            --with-json \
            --with-xml2 \
            --with-modules \
            --with-sqlite3 \
            --with-webp

make -j2
```

within an Emacs git clone I could successfully compile and install
master (2024136d31) on my Mac OS X Lion box (and it works, too :-).
This is a build with the system's `/usr/bin/clang` but using a current
MacPorts installation for all additional tools and libraries.

Unfortunately, it is beyond my rudimentary Mac OS X knowledge to find
out why the above works, and why the similar `port install
emacs-devel` fails.

Attached is the log file; thanks to `-Wno-attributes` its uncompressed
size is around 0.5MB instead of 100MB (!).  I will write a separate
e-mail regarding these attribute warnings.


    Werner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build-emacs.log.xz
Type: application/octet-stream
Size: 29804 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20220724/ff2b08b1/attachment.obj>


More information about the macports-users mailing list