Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build is broken on Ubuntu 16.04 #23

Closed
danilaml opened this issue May 6, 2018 · 8 comments
Closed

Build is broken on Ubuntu 16.04 #23

danilaml opened this issue May 6, 2018 · 8 comments

Comments

@danilaml
Copy link

danilaml commented May 6, 2018

Was building fine recently (1-2 months ago).
Using the script from http://wiki.gnustep.org/index.php/GNUstep_under_Ubuntu_Linux#16.04.2C_16.10.2C_.26_17.04

Trying to build with earlier commits now seems to be also broken, so either I'm doing something wrong (but the script definitely worked before) or one of package updates broke it. Not sure how to deal with this.

touch ./GNUstepBase/GSConfig.h
Making all in Additions ...
Making all for subproject Additions...
 Compiling file GSObjCRuntime.m ...
 Compiling file GSTypeEncoding.c ...
 Compiling file GCObject.m ...
 Compiling file GCArray.m ...
GSObjCRuntime.m:61:26: error: conflicting types for 'objc_get_slot'
extern struct objc_slot *objc_get_slot(Class, SEL);
                         ^
/usr/GNUstep/Local/Library/Headers/objc/runtime.h:865:29: note: previous declaration is here
extern struct objc_slot_v1 *objc_get_slot(Class, SEL)
                            ^
GSObjCRuntime.m:1426:18: warning: incompatible pointer types assigning to 'struct objc_slot *' from 'struct objc_slot_v1 *'
      [-Wincompatible-pointer-types]
              type_slot = objc_get_slot(cls, @selector(retain));
                        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GSObjCRuntime.m:1428:13: warning: incompatible pointer types assigning to 'struct objc_slot *' from 'struct objc_slot_v1 *'
      [-Wincompatible-pointer-types]
              slot = objc_get_slot(cls, typed);
                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:802:29: note: expanded from macro 'strcmp'
     (__builtin_constant_p (s1) && __builtin_constant_p (s2)                  \
                            ^~
GSObjCRuntime.m:1429:43: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                                      ~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:802:58: note: expanded from macro 'strcmp'
     (__builtin_constant_p (s1) && __builtin_constant_p (s2)                  \
                                                         ^~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:803:40: note: expanded from macro 'strcmp'
      && (__s1_len = __builtin_strlen (s1), __s2_len = __builtin_strlen (s2), \
                                       ^~
GSObjCRuntime.m:1429:43: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                                      ~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:803:74: note: expanded from macro 'strcmp'
      && (__s1_len = __builtin_strlen (s1), __s2_len = __builtin_strlen (s2), \
                                                                         ^~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:804:25: note: expanded from macro 'strcmp'
          (!__string2_1bptr_p (s1) || __s1_len >= 4)                          \
                               ^~
/usr/include/x86_64-linux-gnu/bits/string2.h:93:28: note: expanded from macro '__string2_1bptr_p'
  ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
                           ^~~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:804:25: note: expanded from macro 'strcmp'
          (!__string2_1bptr_p (s1) || __s1_len >= 4)                          \
                               ^~
/usr/include/x86_64-linux-gnu/bits/string2.h:93:63: note: expanded from macro '__string2_1bptr_p'
  ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
                                                              ^~~
GSObjCRuntime.m:1429:43: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                                      ~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:805:28: note: expanded from macro 'strcmp'
          && (!__string2_1bptr_p (s2) || __s2_len >= 4))                      \
                                  ^~
/usr/include/x86_64-linux-gnu/bits/string2.h:93:28: note: expanded from macro '__string2_1bptr_p'
  ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
                           ^~~
GSObjCRuntime.m:1429:43: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                                      ~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:805:28: note: expanded from macro 'strcmp'
          && (!__string2_1bptr_p (s2) || __s2_len >= 4))                      \
                                  ^~
/usr/include/x86_64-linux-gnu/bits/string2.h:93:63: note: expanded from macro '__string2_1bptr_p'
  ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
                                                              ^~~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:806:27: note: expanded from macro 'strcmp'
      ? __builtin_strcmp (s1, s2)                                             \
                          ^~
GSObjCRuntime.m:1429:43: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                                      ~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:806:31: note: expanded from macro 'strcmp'
      ? __builtin_strcmp (s1, s2)                                             \
                              ^~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:807:32: note: expanded from macro 'strcmp'
      : (__builtin_constant_p (s1) && __string2_1bptr_p (s1)                  \
                               ^~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:807:58: note: expanded from macro 'strcmp'
      : (__builtin_constant_p (s1) && __string2_1bptr_p (s1)                  \
                                                         ^~
/usr/include/x86_64-linux-gnu/bits/string2.h:93:28: note: expanded from macro '__string2_1bptr_p'
  ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
                           ^~~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:807:58: note: expanded from macro 'strcmp'
      : (__builtin_constant_p (s1) && __string2_1bptr_p (s1)                  \
                                                         ^~
/usr/include/x86_64-linux-gnu/bits/string2.h:93:63: note: expanded from macro '__string2_1bptr_p'
  ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
                                                              ^~~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:808:36: note: expanded from macro 'strcmp'
         && (__s1_len = __builtin_strlen (s1), __s1_len < 4)                  \
                                          ^~
GSObjCRuntime.m:1429:43: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                                      ~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:809:28: note: expanded from macro 'strcmp'
         ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2)               \
                                  ^~
GSObjCRuntime.m:1429:43: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                                      ~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:809:54: note: expanded from macro 'strcmp'
         ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2)               \
                                                            ^~
/usr/include/x86_64-linux-gnu/bits/string2.h:93:28: note: expanded from macro '__string2_1bptr_p'
  ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
                           ^~~
GSObjCRuntime.m:1429:43: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                                      ~~~~~~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:809:54: note: expanded from macro 'strcmp'
         ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2)               \
                                                            ^~
/usr/include/x86_64-linux-gnu/bits/string2.h:93:63: note: expanded from macro '__string2_1bptr_p'
  ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1)
                                                              ^~~
GSObjCRuntime.m:1429:25: error: no member named 'types' in 'struct objc_slot'
              if (strcmp(slot->types, type_slot->types) == 0)
                         ~~~~  ^
/usr/include/x86_64-linux-gnu/bits/string2.h:810:26: note: expanded from macro 'strcmp'
            ? __builtin_strcmp (s1, s2)                                       \
                                ^~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
/usr/GNUstep/System/Library/Makefiles/rules.make:479: recipe for target 'obj/Additions.obj/GSObjCRuntime.m.o' failed
make[4]: *** [obj/Additions.obj/GSObjCRuntime.m.o] Error 1
make[4]: *** Waiting for unfinished jobs....
/usr/GNUstep/System/Library/Makefiles/Instance/subproject.make:45: recipe for target 'internal-subproject-all_' failed
make[3]: *** [internal-subproject-all_] Error 2
/usr/GNUstep/System/Library/Makefiles/Master/rules.make:297: recipe for target 'Additions.all.subproject.variables' failed
make[2]: *** [Additions.all.subproject.variables] Error 2
/usr/GNUstep/System/Library/Makefiles/Master/serial-subdirectories.make:53: recipe for target 'internal-all' failed
make[1]: *** [internal-all] Error 2
/usr/GNUstep/System/Library/Makefiles/Master/serial-subdirectories.make:53: recipe for target 'internal-all' failed
make: *** [internal-all] Error 2
@danilaml danilaml changed the title compilation is broken Build is broken on Ubuntu 16.04 May 6, 2018
@davidchisnall
Copy link
Member

Thanks. This change was not intended to be source incompatible, but I forgot that objc_slot was a publicly visible type.

@davidchisnall
Copy link
Member

Note: This is a bug in the master branch of libobjc2. Using the 1.9 release branch should fix it (and is probably recommended anyway, unless you are using a patched clang and want to test the new ABI).

@danilaml
Copy link
Author

danilaml commented May 8, 2018

@davidchisnall D'OH. Just as Murphy postulated, I tried all branches and all commits except 1.9 (initially I though it's the same as master just by looking at the commit dates) and got the same result but it build successfully with 1.9! Thanks.

@ivucica
Copy link
Member

ivucica commented May 17, 2018

@davidchisnall For my future reference :) is it intended that master branches of libobjc2 and gnustep-base remain compatible?

Stjepan ran into this problem earlier in the week as well. I vaguely recalled some problem and so I was able to help him.

@fredkiefer
Copy link
Member

I am going to close this issue here. If the problem persists, could you please open one against libobjc2 to make it clear where the clean up is needed?

@davidchisnall
Copy link
Member

This is a libobjc2 bug, but it's exposed by a GNUstep bug: we should be conditionally including objc/slot.h, not including it and redeclaring functions from it.

@fredkiefer
Copy link
Member

If you could specify the condition to check for, I am willing to add this. For which version of libobjc2 are the local copies of this functions needed?

@fredkiefer
Copy link
Member

David, I just checked the history of this code and it was added by you on 24 Sep 2010. Maybe it is best to leave what ever clean up is needed here also to you? Maybe the whole code branch could be deleted by now or is only needed for old versions of libobjc2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants