-
Notifications
You must be signed in to change notification settings - Fork 131
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
pkg-config, installation script #71
Comments
I'm working on bringing these back. Are you using pkg-config via a Linux distro or directly from the repo? |
Sweet. Thank you. I apologize. Upon review of the Tux Paint Makefile it appears we're not using pkg-config with libimagequant, but just linking with the To give you more information, we run on a few different OS's. I don't work on the Linux builds myself but I believe the two distributions we build for (Debian and RedHat) have libimagequant available as a distribution package so we just use those. Our port to macOS builds libimagequant from the source and links with the I believe our ports to Windows and Haiku also build libimagequant from the source. They link to it using the I hope some of that information is useful if not confusing. Please let me know if I can provide more information. Thank you again! |
I've added docs, and brought the Makefile back. Does that work for you? https://github.com/ImageOptim/libimagequant/tree/main#upgrading-instructions |
Hi Kornel, Unfortunately the issue appears to be bigger than I had thought. I had previously thought we just needed an install script, but there also appears to be issues with the symbols in the library. Additionally, a new issue has also been introduced since yesterday with the build process. First, the new build process issue:
If I switch to the commit just prior then When I copy the built files to
I get the same error with the latest commit on the main branch after building the files using the Makefile under It looks like the static library does have the symbols Tux Paint needs, but the library appears to be referencing some rust symbols that's missing. Would it be possible to link these symbols into the static library?
Finally, attempting to build and install using cargo-c fails outright:
Thank you for looking into our errors. I really appreciate it! Regards, |
Sorry for the confusion. I've moved the C library to a folder: https://github.com/ImageOptim/libimagequant/tree/main/imagequant-sys |
Thank you. The built library is till failing to link, however. The symbol issue appears to remain:
And Tux Paint continues to fail to build:
|
Are you specifying |
Don't worry about the "no symbols" error. That may be from Rust dependencies that don't have C symbols (are inline, generic, or macros only). |
Yes, a proper
|
I can't reproduce. I think you have copied wrong/old version of the file. The file size I get on M1 Mac is 17185824 bytes.
#include <stdio.h>
#include "libimagequant/imagequant-sys/libimagequant.h"
int main(int argc, char const *argv[])
{
printf("%d\n", liq_version());
} git clone https://github.com/ImageOptim/libimagequant
( cd libimagequant/imagequant-sys/; cargo build --release )
# this works
gcc test.c libimagequant/imagequant-sys/target/release/libimagequant.a
# this works too
gcc test.c -Llibimagequant/imagequant-sys/target/release/ -limagequant |
Thank you for that. Yes, your code works on my setup as well. Apparently what's happening is gcc picks up the shared library instead of the static one if they are in the same directory, and it is shared library that is having the problem. If I delete It looks like
It appears the shared library does not have any symbols:
|
Thank you for diagnosing this. You're right — re-export of symbols for dylib doesn't work ;( |
So it seems the problem is not easy to solve. In that case I recommend:
|
That works for us. Tux Paint can just use the static library. Would it be possible to get the |
Yes, I can make it install a static lib. |
Fantastic. Thank you! |
Hi there,
I noticed this project has transitioned to using cargo instead of autoconf, and as a part of that transition it no longer produces the pkg-config file (*.pc), nor a script to install *.pc, *.h, and the libraries. Are these deprecated or will they be making a comeback?
We have a C-based project, Tux Paint, that uses libimagequant that expects it to work with pkg-config. I was wondering if we need to make changes to Tux Paint or we can just wait for the libimagequant project to make it available again.
Thank you
The text was updated successfully, but these errors were encountered: