drobilla / serd

A lightweight C library for RDF syntax
https://gitlab.com/drobilla/serd
ISC License
86 stars 15 forks source link

serd 0.30.8 build failure on mojave and catalina #32

Closed chenrui333 closed 3 years ago

chenrui333 commented 3 years ago

👋 trying to build the latest release, but run into some build issue. The error log is as below:

serd 0.30.8 test failure on mojave ``` ==> serdi - dyld: lazy symbol binding failed: Symbol not found: _aligned_alloc Referenced from: /usr/local/Cellar/serd/0.30.8/lib/libserd-0.0.dylib Expected in: /usr/lib/libSystem.B.dylib dyld: Symbol not found: _aligned_alloc Referenced from: /usr/local/Cellar/serd/0.30.8/lib/libserd-0.0.dylib Expected in: /usr/lib/libSystem.B.dylib ```
serd 0.30.8 build failure on catalina ``` ../src/serd_config.h:32:9: warning: 'SERD_VERSION' macro redefined [-Wmacro-redefined] #define SERD_VERSION "0.30.7" ^ :2:9: note: previous definition is here #define SERD_VERSION "0.30.8" ^ ../src/system.c:59:10: error: implicit declaration of function 'aligned_alloc' is invalid in C99 [-Werror,-Wimplicit-function-declaration] return aligned_alloc(alignment, size); ^ ../src/system.c:59:10: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'void *' [-Wint-conversion] return aligned_alloc(alignment, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 warnings and 1 error generated. In file included from ../src/serdi.c:19: ../src/serd_config.h:32:9: warning: 'SERD_VERSION' macro redefined [-Wmacro-redefined] #define SERD_VERSION "0.30.7" ^ :2:9: note: previous definition is here #define SERD_VERSION "0.30.8" ^ 1 warning generated. ```

Full build log is in here, https://github.com/Homebrew/homebrew-core/runs/1678765724 relates to https://github.com/Homebrew/homebrew-core/pull/68697

drobilla commented 3 years ago

Actually an issue with building for older MacOS versions from newer ones, as I understand it (I am using Mojave and it worked fine).

Anyway, fixed (sort of) in c4c4ec51, thanks.

chenrui333 commented 3 years ago

let me give that commit a try, thanks @drobilla!

drobilla commented 3 years ago

@chenrui333 You're welcome. Let me know if it works, I botched a few things this time around and would like to make a point release soonish.

chenrui333 commented 3 years ago

@drobilla looks like it still has some issue applying the patch, if you can do another release, that would be great. Thanks!

drobilla commented 3 years ago

The point is that I would like to know before making a release so I don't have to do another one in 5 minutes ;)

chenrui333 commented 3 years ago

I could do add your patch, and I did try the commit , unfortunately, that did not quite work. :(

drobilla commented 3 years ago

Can you be more specific? Is there a CI run I can look at? Sorry, I don't really know how Homebrew packaging works, but if you can tell me how to reproduce what you're doing I can try myself (on Mojave)

chenrui333 commented 3 years ago

@drobilla the new release actually works, resolved the build and get merged in the same PR , thanks! 🎉

drobilla commented 3 years ago

Great. Thanks for packaging!