modelon-community / fmi-library

C library for importing FMUs
Other
111 stars 35 forks source link

Cannot compile in Mac: Zlib issue. #135

Open raktim opened 1 month ago

raktim commented 1 month ago

Getting this error:

~/fmi-library/ThirdParty/Zlib/zlib-1.2.13/gzlib.c:498:14: error: call to undeclared function 'lseek'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] offset = LSEEK(state->fd, 0, SEEK_CUR);

I think this has to do with Mac's zlib library. I have installed zlib using homebrew.

Any help regarding this would be great.

PeterMeisrimelModelon commented 1 month ago

Hi raktim,

we unfortunately don't have a Mac available to reproduce this issue or test any fixes ourselves.

https://github.com/bazelbuild/bazel/issues/17956 seems possibly related. There is a possible fix in there: https://github.com/Blosc/c-blosc/commit/ac72c2c

Could you try patching your zlib & build fmi-library with it?

/Peter

raktim commented 1 month ago

Thanks Peter.

I will try to investigate and resolve it.

Best,

Raktim Bhattacharya

Professor Aerospace Engineering, Texas A&M University @.**@.>, isrlab.github.iohttp://isrlab.github.io

On Aug 7, 2024, at 6:26 AM, PeterMeisrimelModelon @.***> wrote:

This Message Is From an External Sender This message came from outside your organization.

Hi raktim,

we unfortunately don't have a Mac available to reproduce this issue or test any fixes ourselves.

bazelbuild/bazel#17956https://urldefense.com/v3/__https://github.com/bazelbuild/bazel/issues/17956__;!!KwNVnqRv!Cq5U7YWfD8E94AjrhzTfktt-c32Tvtboptn_KQ0R_IV_9KfbZiNapNJsT0mUC9aZ2QfRzalA9-GT60yhVhvdQKA$ seems possibly related. There is a possible fix in there: @.***https://urldefense.com/v3/__https://github.com/Blosc/c-blosc/commit/ac72c2c__;!!KwNVnqRv!Cq5U7YWfD8E94AjrhzTfktt-c32Tvtboptn_KQ0R_IV_9KfbZiNapNJsT0mUC9aZ2QfRzalA9-GT60yhPf9iZu8$

Could you try patching your zlib & build fmi-library with it?

/Peter

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/modelon-community/fmi-library/issues/135*issuecomment-2273245457__;Iw!!KwNVnqRv!Cq5U7YWfD8E94AjrhzTfktt-c32Tvtboptn_KQ0R_IV_9KfbZiNapNJsT0mUC9aZ2QfRzalA9-GT60yhg-y0wMo$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ADKNEEAVELR7XPK2A5HX6NDZQH753AVCNFSM6AAAAABL7M3G7WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZTGI2DKNBVG4__;!!KwNVnqRv!Cq5U7YWfD8E94AjrhzTfktt-c32Tvtboptn_KQ0R_IV_9KfbZiNapNJsT0mUC9aZ2QfRzalA9-GT60yhKciAycg$. You are receiving this because you authored the thread.