bug-gnustep
[Top][All Lists]
Advanced

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

[bug #35802] Linking Problems [libobjc2 1.6 + clang trunk (152539) + Ubu


From: lowell
Subject: [bug #35802] Linking Problems [libobjc2 1.6 + clang trunk (152539) + Ubuntu 11.10]
Date: Mon, 12 Mar 2012 14:42:40 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.53.11 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10

URL:
  <http://savannah.gnu.org/bugs/?35802>

                 Summary: Linking Problems [libobjc2 1.6 + clang trunk
(152539) + Ubuntu 11.10]
                 Project: GNUstep
            Submitted by: lowellv
            Submitted on: Mon 12 Mar 2012 02:42:39 PM GMT
                Category: Libraries
                Severity: 3 - Normal
              Item Group: Installation
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Hello, all.

I am trying to build libobjc2 1.6 (from svn) using a recent build of clang
(NSNumber, NSArray, NSDictionary and BOOL literals!!) on Ubuntu 11.10. It
seems to compile fine, but when it gets to linking, this happens:

        /usr/bin/ld: libobjc.o: relocation R_X86_64_32 against `.data' can not
be used when making a shared object; recompile with -fPIC
        libobjc.o: could not read symbols: Bad value

-fPIC is already specified among the CFLAGS on line 9 of the makefile.

This is a mostly-clean, fresh install of Ubuntu 11.10 in VMware Fusion 4.
Mostly-clean because of the aforementioned Clang 3.1 installation, as well as
compiler-rt (for libblocksruntime, also from trunk) and libdispatch (and its
dependencies, libpthread_workqueue and libkqueue). There is no Objective-C
runtime installed.

This is the build output in its entirety:

        address@hidden:/usr/src/libobjc2-1.6$ make -f Makefile.clang 
        Compiling arc.m...
        In file included from arc.m:7:
        ./class.h:285:14: warning: direct access to objective-c's isa is
deprecated in
              favor of object_setClass() and object_getClass()
              [-Wdeprecated-objc-isa-usage]
                return obj->isa;
                            ^
        arc.m:159:19: warning: direct access to objective-c's isa is
deprecated in favor
              of object_setClass() and object_getClass()
[-Wdeprecated-objc-isa-usage]
                Class cls = obj->isa;
                                 ^
        arc.m:176:19: warning: direct access to objective-c's isa is
deprecated in favor
              of object_setClass() and object_getClass()
[-Wdeprecated-objc-isa-usage]
                Class cls = obj->isa;
                                 ^
        3 warnings generated.
        Compiling associate.m...
        In file included from associate.m:9:
        ./class.h:285:14: warning: direct access to objective-c's isa is
deprecated in
              favor of object_setClass() and object_getClass()
              [-Wdeprecated-objc-isa-usage]
                return obj->isa;
                            ^
        associate.m:186:19: warning: direct access to objective-c's isa is
deprecated in
              favor of object_setClass() and object_getClass()
              [-Wdeprecated-objc-isa-usage]
                Class cls = obj->isa;
                                 ^
        associate.m:225:47: warning: direct access to objective-c's isa is
deprecated in
              favor of object_setClass() and object_getClass()
              [-Wdeprecated-objc-isa-usage]
                Class hiddenClass = allocateHiddenClass(obj->isa); 
                                                             ^
        associate.m:226:33: warning: direct access to objective-c's isa is
deprecated in
              favor of object_setClass() and object_getClass()
              [-Wdeprecated-objc-isa-usage]
                assert(!class_isMetaClass(obj->isa));
                                               ^
        /usr/include/assert.h:92:5: note: expanded from macro 'assert'
          ((expr)                                                             
 \
            ^
        associate.m:235:7: warning: direct access to objective-c's isa is
deprecated in
              favor of object_setClass() and object_getClass()
              [-Wdeprecated-objc-isa-usage]
                obj->isa = hiddenClass;
                     ^
        associate.m:255:32: warning: direct access to objective-c's isa is
deprecated in
              favor of object_setClass() and object_getClass()
              [-Wdeprecated-objc-isa-usage]
                if (class_isMetaClass(object->isa))
                                              ^
        associate.m:314:32: warning: direct access to objective-c's isa is
deprecated in
              favor of object_setClass() and object_getClass()
              [-Wdeprecated-objc-isa-usage]
                if (class_isMetaClass(object->isa))
                                              ^
        associate.m:318:22: warning: direct access to objective-c's isa is
deprecated in
              favor of object_setClass() and object_getClass()
              [-Wdeprecated-objc-isa-usage]
                Class cls = object->isa;
                                    ^
        associate.m:385:32: warning: direct access to objective-c's isa is
deprecated in
              favor of object_setClass() and object_getClass()
              [-Wdeprecated-objc-isa-usage]
                if (class_isMetaClass(object->isa))
                                              ^
        associate.m:387:18: warning: direct access to objective-c's isa is
deprecated in
              favor of object_setClass() and object_getClass()
              [-Wdeprecated-objc-isa-usage]
                        return object->isa;
                                       ^
        associate.m:423:40: warning: direct access to objective-c's isa is
deprecated in
              favor of object_setClass() and object_getClass()
              [-Wdeprecated-objc-isa-usage]
                id new = class_createInstance(object->isa, 0);
                                                      ^
        11 warnings generated.
        Compiling gc_none.c...
        Compiling NSBlocks.m...
        In file included from NSBlocks.m:2:
        ./class.h:285:14: warning: direct access to objective-c's isa is
deprecated in
              favor of object_setClass() and object_getClass()
              [-Wdeprecated-objc-isa-usage]
                return obj->isa;
                            ^
        1 warning generated.
        Compiling Protocol2.m...
        In file included from Protocol2.m:3:
        ./class.h:285:14: warning: direct access to objective-c's isa is
deprecated in
              favor of object_setClass() and object_getClass()
              [-Wdeprecated-objc-isa-usage]
                return obj->isa;
                            ^
        1 warning generated.
        Compiling abi_version.c...
        Compiling alias_table.c...
        Compiling blocks_runtime.m...
        Compiling caps.c...
        Compiling category_loader.c...
        Compiling class_table.c...
        Compiling dtable.c...
        Compiling eh_personality.c...
        In file included from eh_personality.c:4:
        ./dwarf_eh.h:160:8: warning: case value not in enumerated type
              'dwarf_data_encoding' [-Wswitch]
                        case DW_EH_PE_absptr:
                             ^
        1 warning generated.
        Compiling encoding2.c...
        Compiling hash_table.c...
        Compiling hooks.c...
        Compiling ivar.c...
        Compiling legacy_malloc.c...
        Compiling loader.c...
        Compiling mutation.m...
        Compiling properties.m...
        In file included from properties.m:7:
        ./class.h:285:14: warning: direct access to objective-c's isa is
deprecated in
              favor of object_setClass() and object_getClass()
              [-Wdeprecated-objc-isa-usage]
                return obj->isa;
                            ^
        1 warning generated.
        Compiling protocol.c...
        Compiling runtime.c...
        Compiling sarray2.c...
        Compiling selector_table.c...
        Compiling sendmsg2.c...
        Compiling statics_loader.c...
        Compiling toydispatch.c...
        Linking bitcode...
        Generating native object code...
        Linking shared library...
        /usr/bin/ld: libobjc.o: relocation R_X86_64_32 against `.data' can not
be used when making a shared object; recompile with -fPIC
        libobjc.o: could not read symbols: Bad value
        clang: error: linker command failed with exit code 1 (use -v to see
invocation)
        make: *** [libobjc.so.4] Error 1

And here is some compiler info, if needed:

        address@hidden:/usr/src$ clang --version
        clang version 3.1 (trunk 152539)
        Target: x86_64-unknown-linux-gnu
        Thread model: posix
        address@hidden:/usr/src$
        address@hidden:/usr/src$
        address@hidden:/usr/src$
        address@hidden:/usr/src$
        address@hidden:/usr/src$
        address@hidden:/usr/src$ ll
        ll               llvm-cov         llvm-mc          llvm-size
        llc              llvm-diff        llvm-nm          llvm-stress
        lli              llvm-dis         llvm-objdump     llvm-stub
        llvm-ar          llvm-dwarfdump   llvm-prof        llvm-tblgen
        llvm-as          llvm-extract     llvm-ranlib      
        llvm-bcanalyzer  llvm-ld          llvm-readobj     
        llvm-config      llvm-link        llvm-rtdyld
        address@hidden:/usr/src$
        address@hidden:/usr/src$
        address@hidden:/usr/src$
        address@hidden:/usr/src$
        address@hidden:/usr/src$
        address@hidden:/usr/src$ clang -arch x86_64 -dM -E - < /dev/null |
sort
        clang: warning: argument unused during compilation: '-arch x86_64'
        #define __amd64 1
        #define __amd64__ 1
        #define __ATOMIC_ACQ_REL 4
        #define __ATOMIC_ACQUIRE 2
        #define __ATOMIC_CONSUME 1
        #define __ATOMIC_RELAXED 0
        #define __ATOMIC_RELEASE 3
        #define __ATOMIC_SEQ_CST 5
        #define __CHAR16_TYPE__ unsigned short
        #define __CHAR32_TYPE__ unsigned int
        #define __CHAR_BIT__ 8
        #define __clang__ 1
        #define __clang_major__ 3
        #define __clang_minor__ 1
        #define __clang_patchlevel__ 0
        #define __clang_version__ "3.1 ((trunk 152539))"
        #define __CONSTANT_CFSTRINGS__ 1
        #define __DBL_DENORM_MIN__ 4.9406564584124654e-324
        #define __DBL_DIG__ 15
        #define __DBL_EPSILON__ 2.2204460492503131e-16
        #define __DBL_HAS_DENORM__ 1
        #define __DBL_HAS_INFINITY__ 1
        #define __DBL_HAS_QUIET_NAN__ 1
        #define __DBL_MANT_DIG__ 53
        #define __DBL_MAX_10_EXP__ 308
        #define __DBL_MAX__ 1.7976931348623157e+308
        #define __DBL_MAX_EXP__ 1024
        #define __DBL_MIN_10_EXP__ (-307)
        #define __DBL_MIN__ 2.2250738585072014e-308
        #define __DBL_MIN_EXP__ (-1021)
        #define __DECIMAL_DIG__ 21
        #define __ELF__ 1
        #define __FINITE_MATH_ONLY__ 0
        #define __FLT_DENORM_MIN__ 1.40129846e-45F
        #define __FLT_DIG__ 6
        #define __FLT_EPSILON__ 1.19209290e-7F
        #define __FLT_EVAL_METHOD__ 0
        #define __FLT_HAS_DENORM__ 1
        #define __FLT_HAS_INFINITY__ 1
        #define __FLT_HAS_QUIET_NAN__ 1
        #define __FLT_MANT_DIG__ 24
        #define __FLT_MAX_10_EXP__ 38
        #define __FLT_MAX__ 3.40282347e+38F
        #define __FLT_MAX_EXP__ 128
        #define __FLT_MIN_10_EXP__ (-37)
        #define __FLT_MIN__ 1.17549435e-38F
        #define __FLT_MIN_EXP__ (-125)
        #define __FLT_RADIX__ 2
        #define __GNUC__ 4
        #define __GNUC_MINOR__ 2
        #define __GNUC_PATCHLEVEL__ 1
        #define __GNUC_STDC_INLINE__ 1
        #define __gnu_linux__ 1
        #define __GXX_ABI_VERSION 1002
        #define __GXX_RTTI 1
        #define __INT16_TYPE__ short
        #define __INT32_TYPE__ int
        #define __INT64_C_SUFFIX__ L
        #define __INT64_TYPE__ long int
        #define __INT8_TYPE__ char
        #define __INT_MAX__ 2147483647
        #define __INTMAX_MAX__ 9223372036854775807L
        #define __INTMAX_TYPE__ long int
        #define __INTMAX_WIDTH__ 64
        #define __INTPTR_TYPE__ long int
        #define __INTPTR_WIDTH__ 64
        #define __k8 1
        #define __k8__ 1
        #define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
        #define __LDBL_DIG__ 18
        #define __LDBL_EPSILON__ 1.08420217248550443401e-19L
        #define __LDBL_HAS_DENORM__ 1
        #define __LDBL_HAS_INFINITY__ 1
        #define __LDBL_HAS_QUIET_NAN__ 1
        #define __LDBL_MANT_DIG__ 64
        #define __LDBL_MAX_10_EXP__ 4932
        #define __LDBL_MAX__ 1.18973149535723176502e+4932L
        #define __LDBL_MAX_EXP__ 16384
        #define __LDBL_MIN_10_EXP__ (-4931)
        #define __LDBL_MIN__ 3.36210314311209350626e-4932L
        #define __LDBL_MIN_EXP__ (-16381)
        #define __linux 1
        #define __linux__ 1
        #define linux 1
        #define __LITTLE_ENDIAN__ 1
        #define __llvm__ 1
        #define __LONG_LONG_MAX__ 9223372036854775807LL
        #define __LONG_MAX__ 9223372036854775807L
        #define __LP64__ 1
        #define _LP64 1
        #define __MMX__ 1
        #define __NO_INLINE__ 1
        #define __NO_MATH_INLINES 1
        #define __POINTER_WIDTH__ 64
        #define __PRAGMA_REDEFINE_EXTNAME 1
        #define __PTRDIFF_TYPE__ long int
        #define __PTRDIFF_WIDTH__ 64
        #define __REGISTER_PREFIX__ 
        #define __SCHAR_MAX__ 127
        #define __SHRT_MAX__ 32767
        #define __SIG_ATOMIC_WIDTH__ 32
        #define __SIZEOF_DOUBLE__ 8
        #define __SIZEOF_FLOAT__ 4
        #define __SIZEOF_INT__ 4
        #define __SIZEOF_LONG__ 8
        #define __SIZEOF_LONG_DOUBLE__ 16
        #define __SIZEOF_LONG_LONG__ 8
        #define __SIZEOF_POINTER__ 8
        #define __SIZEOF_PTRDIFF_T__ 8
        #define __SIZEOF_SHORT__ 2
        #define __SIZEOF_SIZE_T__ 8
        #define __SIZEOF_WCHAR_T__ 4
        #define __SIZEOF_WINT_T__ 4
        #define __SIZE_TYPE__ long unsigned int
        #define __SIZE_WIDTH__ 64
        #define __SSE__ 1
        #define __SSE2__ 1
        #define __SSE2_MATH__ 1
        #define __SSE_MATH__ 1
        #define __STDC__ 1
        #define __STDC_HOSTED__ 1
        #define __STDC_VERSION__ 199901L
        #define __tune_k8__ 1
        #define __UINTMAX_TYPE__ long unsigned int
        #define __unix 1
        #define __unix__ 1
        #define unix 1
        #define __USER_LABEL_PREFIX__ 
        #define __VERSION__ "4.2.1 Compatible Clang 3.1 ((trunk 152539))"
        #define __WCHAR_MAX__ 2147483647
        #define __WCHAR_TYPE__ int
        #define __WCHAR_WIDTH__ 32
        #define __WINT_TYPE__ unsigned int
        #define __WINT_UNSIGNED__ 1
        #define __WINT_WIDTH__ 32
        #define __x86_64 1
        #define __x86_64__ 1
        address@hidden:/usr/src$ 

Can anyone point me in the right direction, please?

Thanks for your time.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 12 Mar 2012 02:42:39 PM GMT  Name: clang-version.txt  Size: 5kB  
By: lowellv

<http://savannah.gnu.org/bugs/download.php?file_id=25332>
-------------------------------------------------------
Date: Mon 12 Mar 2012 02:42:39 PM GMT  Name: address@hidden 
Size: 6kB   By: lowellv

<http://savannah.gnu.org/bugs/download.php?file_id=25333>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?35802>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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