bugGNUstep - Bugs: bug #41952, CentOS 5.x cannot install...

Group
 
 

bug #41952: CentOS 5.x cannot install gnustep-base since r36344 (GSPrivateHash.m)

Submitter:  T.Somequare <tsomeqdev>
Submitted:  Tue 25 Mar 2014 01:31:09 PM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  None Status:  Wont Fix
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 25 Jul 2014 02:10:35 PM UTC, comment #4: 

Tentatively closing this as a 'wont fix' since it actually seems to be a compiler bug on a specific (rather old) operating system and cpu architecture rather than a GNUstep bug.

Would be willing to accept a patch with a small/simple workaround for the issue though.

Richard Frith-Macdonald <CaS>
Group Member
Thu 27 Mar 2014 12:09:36 AM UTC, comment #3: 

I am using gcc 4.1.2 .

 $ cc --version
 cc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54)
 Copyright (C) 2006 Free Software Foundation, Inc.
 …
 $ uname -iopms
 Linux x86_64 x86_64 x86_64 GNU/Linux

I think the compiler message does not tell the cause exactly.
I cannot see any difference of GSString.m.o files though I recompile with or without -fPIC flag.

I tried this:
---
 $ cd gnustep-base-r36344/
 $ ./configure
 $ make  # … aborted due to the LD (collect2) error.
 $ rm ./Sources/libgnustep-base.obj/GSString.m.o
 $ CC='cc -fPIC' make;     # … GSString.m.o is generated, but whose file size is same.
---

Perhaps, these output is useful:
---
 $ objdump -t  ./Source/obj/libgnustep-base.obj/GSString.m.o | grep GSPrivateHash
 0000000000000000         UND  0000000000000000 GSPrivateHash

 $ readelf --relocs Source/obj/libgnustep-base.obj/GSString.m.o| grep -C3 GSPrivateHash
 000000003646  026c00000004 R_X86_64_PLT32    0000000000000000 NSZoneFromPointer + fffffffffffffffc
 000000003651  026d00000004 R_X86_64_PLT32    0000000000000000 NSZoneFree + fffffffffffffffc
 000000003695  000300000002 R_X86_64_PC32     0000000000000000 .data + f1f
 0000000036e0  027e00000002 R_X86_64_PC32     0000000000000000 GSPrivateHash + fffffffffffffffc
 000000003713  014800000002 R_X86_64_PC32     0000000000000000 .data.rel.local + 1f44
 000000003722  014800000002 R_X86_64_PC32     0000000000000000 .data.rel.local + 26cc
 000000003737  027d00000004 R_X86_64_PLT32    0000000000000000 objc_msg_lookup_super + fffffffffffffffc
 000000003741  014800000002 R_X86_64_PC32     0000000000000000 .data.rel.local + 26cc
 000000003770  027e00000002 R_X86_64_PC32     0000000000000000 GSPrivateHash + fffffffffffffffc
 0000000037a8  014800000002 R_X86_64_PC32     0000000000000000 .data.rel.local + 258c
 0000000037c9  026000000004 R_X86_64_PLT32    0000000000000000 objc_msg_lookup + fffffffffffffffc
 0000000037d6  014800000002 R_X86_64_PC32     0000000000000000 .data.rel.local + 268c

 $ readelf --symbols  Source/obj/libgnustep-base.obj/GSString.m.o | grep -C3 GSPrivateHash
   635: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND GSObjCIsKindOf
   636: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND GSPrivateDefaultCStringEn
   637: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND objc_msg_lookup_super
   638: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND GSPrivateHash
   639: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND NSStringFromSelector
   640: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND strlen
   641: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND strchr

 $ readelf --relocs ./Source/obj/libgnustep-base.obj/GSPrivateHash.m.o | head
 
 Relocation section '.rela.text' at offset 0x16d0 contains 2 entries:
   Offset          Info           Type           Sym. Value    Sym. Name + Addend
 000000000066  001100000004 R_X86_64_PLT32    0000000000000000 GSPrivateIncrementalHa + fffffffffffffffc
 000000000075  001200000004 R_X86_64_PLT32    0000000000000030 GSPrivateFinishHash + fffffffffffffffc
 
 Relocation section '.rela.debug_info' at offset 0x1700 contains 84 entries:
   Offset          Info           Type           Sym. Value    Sym. Name + Addend
 000000000006  00050000000a R_X86_64_32       0000000000000000 .debug_abbrev + 0
 00000000000c  00070000000a R_X86_64_32       0000000000000000 .debug_line + 0
---

Finally , I modified GSString.m ,  adding '#include "GSPrivateHash.m" '.
After that:
---
 $ readelf --relocs Source/obj/libgnustep-base.obj/GSString.m.o | grep -C3 GSPrivateHash
 000000003826  026e00000004 R_X86_64_PLT32    0000000000000000 NSZoneFromPointer + fffffffffffffffc
 000000003831  026f00000004 R_X86_64_PLT32    0000000000000000 NSZoneFree + fffffffffffffffc
 000000003875  000300000002 R_X86_64_PC32     0000000000000000 .data + f1f
 0000000038c0  025e00000002 R_X86_64_PC32     0000000000000040 GSPrivateHash + fffffffffffffffc
 0000000038f3  014700000002 R_X86_64_PC32     0000000000000000 .data.rel.local + 1f64
 000000003902  014700000002 R_X86_64_PC32     0000000000000000 .data.rel.local + 26ec
 000000003917  027f00000004 R_X86_64_PLT32    0000000000000000 objc_msg_lookup_super + fffffffffffffffc
 000000003921  014700000002 R_X86_64_PC32     0000000000000000 .data.rel.local + 26ec
 000000003950  025e00000002 R_X86_64_PC32     0000000000000040 GSPrivateHash + fffffffffffffffc
 000000003988  014700000002 R_X86_64_PC32     0000000000000000 .data.rel.local + 25ac
 0000000039a9  026200000004 R_X86_64_PLT32    0000000000000000 objc_msg_lookup + fffffffffffffffc
 0000000039b6  014700000002 R_X86_64_PC32     0000000000000000 .data.rel.local + 26ac

 $ readelf --symbols Source/obj/libgnustep-base.obj/GSString.m.o | grep -C3 GSPrivateHash
   603: 0000000000000000    45 FUNC    GLOBAL INTERNAL    2 GSPrivateIncrementalHash
   604: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND __gnu_objc_personality_v0
   605: 0000000000000030     3 FUNC    GLOBAL INTERNAL    2 GSPrivateFinishHash
   606: 0000000000000040    63 FUNC    GLOBAL INTERNAL    2 GSPrivateHash
   607: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND GLOBAL_OFFSET_TABLE
   608: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND __objc_exec_class
   609: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND objc_get_class


T.Somequare <tsomeqdev>
Wed 26 Mar 2014 10:10:58 AM UTC, comment #2: 

It builds fine for me on CentOS-5.10 32bit with gcc-4.1.2 (and also on CentOS-6.5 64bit with clang-3.3 which is my main development system right now).

However, it seems likely you have already found the problem to be a compiler issue … and the error message sounds like its possibly a 64bit problem with the compiler/linker (though you may be right that the underlying cause is a preprocessor bug).

The oldest compiler version expected to build gnustep is gcc-4 … what version are you using?

Another thought … the error message says:
recompile with -fPIC

but it should be built with that flag anyway … perhaps you could investigate that?

Richard Frith-Macdonald <CaS>
Group Member
Tue 25 Mar 2014 02:06:01 PM UTC, comment #1: 

Removing the entry "GSPrivateHash.m" in Source/GNUmakefile and embedding its contents into GSString.m works well.
Perhaps this is a preprocessor macro`s problem.

T.Somequare <tsomeqdev>
Tue 25 Mar 2014 01:31:09 PM UTC, original submission:  

I tried to do "make" on gnustep-base 1.24.4 , 1.24.5, 1.24.6 on CentOS 5.10 .
But they are could not be compiled anyway.

--- snipped ---
 Compiling file GSFFIInvocation.m ...
 Linking library libgnustep-base ...
/usr/bin/ld: obj/libgnustep-base.obj/GSString.m.o: relocation R_X86_64_PC32 against `GSPrivateHash' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status




This issue is also reported here.
http://lists.gnu.org/archive/html/bug-gnustep/2014-02/msg00000.html

I checked if this would reproduce on older revision .
So I found this issue was from r36344.

Regards.

T.Somequare <tsomeqdev>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by tsomeqdev (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-07-25 CaS StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code