discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: base fails to build - exception problem


From: Richard Frith-Macdonald
Subject: Re: base fails to build - exception problem
Date: Sun, 30 Aug 2015 18:03:30 +0100

> On 30 Aug 2015, at 17:30, Riccardo Mottola <riccardo.mottola@libero.it> wrote:
> 
> Hi Richard,
> 
> 
> Richard Frith-Macdonald wrote:
>> To get that error, HAVE_UNEXPECTED must be defined but the symbol must be 
>> missing.
>> 
>> That could either be some problem with configure.ac (so you could look in 
>> config.log)
>> or it could be an issue with using a different compiler/runtime at configure 
>> time and build time.
>> 
>> The things to look at are the compiler selected and the flags controlling 
>> which runtime is used during configuration and build.
> 
> I select the compiler when configuring and building gnustep-mape with
> these variables:
> 
> 
> During the base configure, I see:
> checking for objc_setUncaughtExceptionHandler() in runtime... no
> checking for objc_set_unexpected() in runtime... no
> checking for _objc_unexpected_exception in runtime... yes
> checking whether to enable native Objective-C exceptions... yes
> 
> yet, I get this:
> NSException.m:818:3: error: '_objc_unexpected_exception' undeclared
> (first use in this function)
>   _objc_unexpected_exception = callUncaughtHandler;
>   ^
> NSException.m:818:3: note: each undeclared identifier is reported only

So … that means the variable is undeclared when you build.


> When doing the configure check:
> configure:8122: gcc5 -o conftest -g -O2  -I/Local/Library/Headers
> -I/Local/Library/Headers -I/System/Library/Headers -I/usr/local/include
> -fgnu-runtime -x objective-c  -L/Local/Library/Libraries
> -L/Local/Library/Libraries -L/System/Library/Libraries -L/usr/local/lib
> conftest.c -lrt  -lpthread -rdynamic -Wl,-rpath=/usr/local/lib/gcc5
> -shared-libgcc -pthread -fexceptions -fgnu-runtime
> -L/home/multix/GNUstep/Library/Libraries -L/Local/Library/Libraries
> -L/System/Library/Libraries -L/usr/local/lib -lobjc -lm     >&5

The check works … so presumably the variable is declared when you configure

> 
> When building NSException, teh build command line is:
> gcc5 NSException.m -c \
>      -MMD -MP -DGNUSTEP_TARGET_DIR=\".\" -DGNUSTEP_TARGET_CPU=\"ix86\"
> -DGNUSTEP_TARGET_OS=\"freebsd\" -DGNUSTEP_IS_FLATTENED=\"yes\"
> -DLIBRARY_COMBO=\"gnu-gnu-gnu\" -DGNUSTEP_BASE_INTERNAL=1 -Wall
> -Wdeclaration-after-statement -Wcast-align -DGNUSTEP
> -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1
> -DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing -fexceptions
> -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS -pthread -fPIC -Wall
> -DGSWARN -DGSDIAGNOSE -Wno-import -g -O2 -fgnu-runtime -fgnu-runtime
> -fconstant-string-class=NSConstantString -I../Headers -I./. -I.
> -I/home/multix/GNUstep/Library/Headers -I/Local/Library/Headers
> -I/System/Library/Headers -I/usr/local/include -I/Local/Library/Headers
> -I/Local/Library/Headers -I/System/Library/Headers
> -I/usr/local/lib/libffi-3.2.1/include -I/usr/local/include/libxml2
> -I/usr/local/include -I/usr/local/include -I/usr/local/include/p11-kit-1 \
>       -o obj/libgnustep-base.obj/NSException.m.o
> 
> The only difference I spot is that one has:
> -fexceptions -fgnu-runtime
> 
> the other one has:
> -fexceptions -fobjc-exceptions -fgnu-runtime -fgnu-runtime

Those flags should have nothing to do with variable visibility.  The most 
likely problem is with the wrong runtime being found in one of those cases.
So you should look at the -I flags saying where the header files are found.
For instance, -I/home/multix/GNUstep/Library/Headers might be pointing to 
different objc headers (it’s not mentioned in the check at configure time).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]