bugGNUstep - Bugs: bug #53338, base configure script does not...

Group
 
 

bug #53338: base configure script does not detect nonfragile ABI correctly

Submitter:  Graham Lee <leeg>
Submitted:  Tue 13 Mar 2018 09:34:29 PM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  Works For Me
Privacy:  Public Assigned to:  CaS
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 26 Oct 2020 08:32:14 AM UTC, comment #5: 

Please reopen if this is a legitimate issue.

Gregory John Casamento <gcasa>
Group administrator
Sun 22 Apr 2018 08:18:31 PM UTC, comment #4: 


> Except that ARC requires the -fobjc-nonfragile-abi flag.


It doesn't on my systems (and shouldn't afaik with any version of clang).  I expect the error you got is because you aren't specifying the correct runtime, not because you aren't specifying the obsolete/broken -fobjc-nonfragile-abi flag.

If you are using current gnustep-make configured to support it (ie --with-library-combo=ng-gnu-gnu) then it should work because the build system should be compiling with the correct flags, but if you are specifying compiler flags manually in environment variables etc you are expected to know what you are doing and it's not really a gnustep issue.

Try configuring gnustep-make to use the new compiler/runtime features (ng), and see if there are any problems then.

Richard Frith-Macdonald <CaS>
Group Member
Sun 22 Apr 2018 07:53:30 PM UTC, comment #3: 

Except that ARC requires the -fobjc-nonfragile-abi flag.  If you specify -fobjc-arc without -fobjc-nonfragile-abi flag then the compile will fail with the message "error: -fobjc-arc is not supported on platforms using the legacy runtime"

Galen Rhodes <galenrhodes>
Sun 22 Apr 2018 07:29:15 PM UTC, comment #2: 

Sorry I missed seeing the original bug report here.

I think this is probably referencing some old version of GNUstep, because it's talking about '-fobjc-nonfragile-abi'.

David said that option doesn't work properly in clang, so it has been removed  from gnustep (so there should be no more '--enable-objc-nonfragile-abi' option in gnustep-make).

When you want the nonfragile abi, you should be configuring gnustep-make using --with-library-combo=ng-gnu-gnu which should automatically use the nonfragile abi.

Richard Frith-Macdonald <CaS>
Group Member
Sun 22 Apr 2018 06:17:25 PM UTC, comment #1: 

I found the issue in the base/configure script that is causing this problem. the -fobjc-nonfragile-abi flag was removed from the script when it is testing for non fragile abi support so it always fails. This issue starts on line 8061 and a missing line between 8081 and 8082.  I'll try to attach a screen shot of the file comparison.

Galen Rhodes <galenrhodes>
Tue 13 Mar 2018 09:34:29 PM UTC, original submission:  

Platform: linux (fedora core 27)
Compiler: clang 5.0.1
ObjC runtime: libobjc2

GNUstep-make was configured with '--enable-objc-nonfragile-abi'. I see in the gnustep-config output:

$ gnustep-config --objc-flags
-MMD -MP -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 -fobjc-nonfragile-abi -D_NONFRAGILE_ABI -pthread -fPIC -g -DDEBUG -fno-omit-frame-pointer -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -fobjc-runtime=gnustep-1.8.1 -fblocks -fobjc-runtime=gnustep-1.8.1 -fgnu-runtime -fconstant-string-class=NSConstantString -I. -I/home/leeg/GNUstep/Library/Headers -I/usr/local/include

GNUstep-base configure script, when configured either with no flags or with --disable-mixedabi, does not detect the nonfragile abi. Then building -base fails, because I requested the nonfragile ABI but it can't find it. I find that if I compile the test program:

$ clang config/config.non-fragile-ivars.m
$ ./a.out
$ echo $?
1 [i.e. no nonfragile ABI detected]

however:

$ clang -fobjc-runtime=gnustep-1.8.1 config/config.non-fragile-ivars.m
$ ./a.out
$ echo $?

  1. [i.e. it was detected!]


If I edit GSConfig.h by hand to change GS_NONFRAGILE=1, then -base builds and 'make check' succeeds.

The expected behaviour is that ./configure correctly detects the nonfragile ABI availability.

Graham Lee <leeg>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #43987:  Screen Shot 2018-04-22 at 12.25.22 PM.png added by galenrhodes (902KiB - image/png - Screen shot of missing compile flags (right side) during non-fragile ABI test.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gcasa (Posted a comment)
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by galenrhodes (Posted a comment)
  • -email is unavailable- added by leeg (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-10-26 gcasa StatusNone Works For Me
        Assigned toNone CaS
        Open/ClosedOpen Closed
    2018-04-22 galenrhodes Attached File- Added Screen Shot 2018-04-22 at 12.25.22 PM.png, #43987

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code