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

selecting libjpeg or libjpeg-turbo #46

Open
thorsteinssonh opened this issue Mar 22, 2018 · 1 comment
Open

selecting libjpeg or libjpeg-turbo #46

thorsteinssonh opened this issue Mar 22, 2018 · 1 comment

Comments

@thorsteinssonh
Copy link

By default the package links against libjpeg on my ubuntu 16.04. However, libjpeg-turbo8 is also available. I was hoping that the turbo library would be selected at compile time, but it seems go-libjpeg favours libjpeg, at least on my system. In the cgo header somwhere I noticed there is a "-ljpeg" presumably this will therefore only link against libjpeg. Could you advice how I would select libjpeg-turbo instead?

Cheers,
Hrob.

@scaszoo
Copy link

scaszoo commented May 15, 2020

Hi Hrob,

You probably solved that issue by now. But everybody else who's looking for an answer:
CGO_LDFLAGS="-L/tmp/libjpeg-turbo/lib64" CGO_CPPFLAGS="-I/tmp/libjpeg-turbo/include" LD_LIBRARY_PATH="/tmp/libjpeg-turbo/lib64" go run main.go
would work fine. But of course you have to find the appropriate folders for libjpeg-turbo on your system first and replace them in the string above.

Thanks for pointing me in the right direction EAX/N3o

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

2 participants