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

Ubuntu Make Problem #28

Open
brizoo opened this issue Nov 29, 2013 · 5 comments
Open

Ubuntu Make Problem #28

brizoo opened this issue Nov 29, 2013 · 5 comments

Comments

@brizoo
Copy link

brizoo commented Nov 29, 2013

Hi,

I'm encountering a "make" problem on ubuntu server 13.04 (GNU/Linux 3.8.0-33-generic x86_64).

Everything seems to be fine until the make command. I was able to install imgmin successfully on a 12.04 LTS ubuntu server, but not on this new machine. I love this script it is fast and the ratio quality/weight is just wonderful I think.

Below, the output in terminal:

root@pop-front1:~/imgmin# make
make all-recursive
make[1]: Entering directory /root/imgmin' Making all in src make[2]: Entering directory/root/imgmin/src'
gcc -W -Wall -Os MagickWand-config --cflags --cppflags -o imgmin imgmin.c MagickWand-config --ldflags --libs
imgmin.c: In function ‘do_png’:
imgmin.c:389:9: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
imgmin.c:399:9: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
imgmin.c:406:9: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
imgmin.c:429:9: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
imgmin.c:368:32: warning: unused parameter ‘mw’ [-Wunused-parameter]
imgmin.c:369:50: warning: unused parameter ‘opt’ [-Wunused-parameter]
make -C apache2
make[3]: Entering directory /root/imgmin/src/apache2' if [ "apxs2" != "" ]; then \ apxs2 -Ipwd/..MagickWand-config --cppflags --ldflags --libs|xargs-Wc,-DIMGMIN_LIB -Wc,-W -Wc,-Wall -Wc,-Wno-unused-parameter -c mod_imgmin.c ../imgmin.c; \ fi Use of uninitialized value $includedir in concatenation (.) or string at (eval 9) line 1. apxs:Error: Unknown option: f. Usage: apxs -g [-S <var>=<val>] -n <modname> apxs -q [-S <var>=<val>] <query> ... apxs -c [-S <var>=<val>] [-o <dsofile>] [-D <name>[=<value>]] [-I <incdir>] [-L <libdir>] [-l <libname>] [-Wc,<flags>] [-Wl,<flags>] [-p] <files> ... apxs -i [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ... apxs -e [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ... make[3]: *** [mod_imgmin_la] Error 1 make[3]: Leaving directory/root/imgmin/src/apache2'
make[2]: *** [mod_imgmin] Error 2
make[2]: Leaving directory /root/imgmin/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/root/imgmin'
make: *** [all] Error 2

Do you know what this could be ?

Thanks

@ptz0n
Copy link

ptz0n commented Jun 2, 2014

Have you installed the Prerequisites?

@brizoo
Copy link
Author

brizoo commented Jun 2, 2014

Yes, I have all the prerequisites installed, as well as all configured correctly. Since the last version of ubuntu server I can't install imgmin.. Which is really sad because I really enjoy the quality / size obtained by using this script.

@rflynn
Copy link
Owner

rflynn commented Jun 2, 2014

the error is in building the apache module (apxs2 is an apache2 utility). the "make[1]" line appears to have correctly built the "imgmin" executable (with warnings).

micmro pushed a commit to micmro/imgmin that referenced this issue Aug 3, 2015
@micmro
Copy link
Contributor

micmro commented Aug 3, 2015

I had the same issue and used @AerisG222's solution from #21 and it fixed the issue for me. I have created a PR with the change to src/apache2/Makefile.am.

rflynn added a commit that referenced this issue Aug 9, 2015
issue #28 fixed with @AerisG222 solution from #21
@Magotchi
Copy link

AerisG222's solution from #21 was added in ea2b77c to fix this problem, but on Arch Linux with ImageMagick libs 6.9.2-0, the output of:

MagickWand-config --cppflags --ldflags --libs | xargs

is

-fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-6 -lMagickWand-6.Q16HDRI -lMagickCore-6.Q16HDRI -lMagickWand-6.Q16HDRI -lMagickCore-6.Q16HDRI

Since there are multiple instances of "-fopenmp ", to fix the problem, I add the "g" (global) flag on sed, like:

$(MAGICK_CONFIG) --cppflags --ldflags --libs|xargs|sed "s/-fopenmp\s//g"

I only need this fix on systems with Apache installed, as the Apache module doesn't get built without it.

zvezdochiot pushed a commit to ImageProcessing-ElectronicPublications/imgmin that referenced this issue Dec 24, 2022
zvezdochiot pushed a commit to ImageProcessing-ElectronicPublications/imgmin that referenced this issue Dec 24, 2022
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

5 participants