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

Static building multiple undefined reference errors (since 91c0aa8) #230

Open
DanTheMann15 opened this issue Jun 27, 2023 · 2 comments
Open

Comments

@DanTheMann15
Copy link

I tried compiling libplist for tsschecker and img4tool and i ran into this issue.

Host: Windows (x86_64)
Target: Windows (x86_64)
Toolchain: MSYS2

the same error happens when cross compiling static on ubuntu as well.

the arguments i passed were:
./autogen.sh --enable-static --disable-shared --without-cython --prefix=/usr/local
and then
make LDFLAGS=-all-static

( i even tried without specifying LDFLAGS=-all-static, no luck. )

the full log is attached as a text document: libplist_msys2_buildlog_20230627_0310.txt

i did some git checkouts to find when it last worked and turns out that 91c0aa8 was the commit that broke static compilation of the tool, and it's been broken since. so i think the program itself might need updating to handle the PLIST_API changes in the headers.

@DanTheMann15 DanTheMann15 changed the title plistutil - multiple undefined references error (since 91c0aa8) Static building multiple undefined reference errors (since 91c0aa8) Jun 30, 2023
@DanTheMann15
Copy link
Author

Update: i can't compile anything that uses libplist statically either.

i get the same errors in the libs as well... ugh...

@DanTheMann15
Copy link
Author

Update: I think i figured it out... when compiling static, for some reason LIBPLIST_STATIC doesn't get defined, the same thing occurs in libirecovery as well.

defining LIBPLIST_STATIC fixes compilation, i don't know why it doesn't do it automatically when --enable-static --disable-shared is passed, but it needs some looking into.

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

No branches or pull requests

1 participant