GNU bug report logs - #72620
GNUstep build on Linux fails due to lacking -fobjc-exception flag

Previous Next

Package: emacs;

Reported by: Daphne Preston-Kendal <dpk <at> nonceword.org>

Date: Wed, 14 Aug 2024 12:19:02 UTC

Severity: normal

To reply to this bug, email your comments to 72620 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#72620; Package emacs. (Wed, 14 Aug 2024 12:19:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daphne Preston-Kendal <dpk <at> nonceword.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 14 Aug 2024 12:19:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daphne Preston-Kendal <dpk <at> nonceword.org>
To: bug-gnu-emacs <at> gnu.org
Subject: GNUstep build on Linux fails due to lacking -fobjc-exception flag
Date: Wed, 14 Aug 2024 14:17:40 +0200
[Message part 1 (text/plain, inline)]
Emacs 29.4 build from source tarball

Configure command:
./configure --with-ns

configure runs fine, make eventually fails with:
gcc -c  -Demacs  -I. -I. -I../lib -I../lib         -I/usr/include/libxml2                 -MMD -MF deps/nsfont.d -MP     -I/usr/include/p11-kit-1        -g3 -O2 -MMD -MP -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing -pthread -fPIC -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -O2 -pipe -g -ffile-prefix-map=/builddir/gnustep-make-2.9.2=. -fconstant-string-class=NSConstantString -I. -I/home/dpk/GNUstep/Library/Headers -I/usr/include -std=c99  nsfont.m
nsfont.m: In function 'ns_uni_to_glyphs_1':
nsfont.m:1613:9: error: '-fobjc-exceptions' is required to enable Objective-C exception syntax
 1613 |         {
      |         ^

(this is the output from make V=1)

This can be fixed by running ./configure as:

CC="gcc -fobjc-exceptions" ./configure --with-ns
which produces a lot of spurious warnings:
cc1: warning: command-line option '-fobjc-exceptions' is valid for ObjC/ObjC++ but not for C
but with no ill effect – the build successfully completes this way.

Neither OBJC nor OBJCFLAGS has any effect despite this being an
Objective-C file. It seems to compile .m files with CC and CCFLAGS
rather than OBJC and OBJCFLAGS. This might be the root of the issue.


gcc --version:
gcc (GCC) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


uname -a:
Linux voidvm 6.6.43_1 #1 SMP PREEMPT_DYNAMIC Sun Jul 28 03:10:47 UTC 2024 x86_64 GNU/Linux


Running on Void Linux on musl with the following GNUstep packages installed:
gnustep-back-0.31.0_1
gnustep-base-1.30.0_1
gnustep-base-devel-1.30.0_1
gnustep-gui-0.31.1_1
gnustep-gui-devel-0.31.1_1
gnustep-make-2.9.2_1

[config.log (application/octet-stream, attachment)]
[config.status (application/octet-stream, attachment)]
[configure-output.txt (text/plain, attachment)]
[Message part 5 (text/plain, inline)]


This bug report was last modified 304 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.