imgmin icon indicating copy to clipboard operation
imgmin copied to clipboard

compile error w/ apxs

Open AerisG222 opened this issue 13 years ago • 5 comments

Hello,

I was not able to compile on my system (Fedora 17), as it was failing on the call to apxs, with an error stating:

apxs:Error: Unknown option: f.

After looking at what was going on, the results on my system of MagickWand-config --cppflags --ldflags --libs|xargs resulted in the following:

-fopenmp -I/usr/include/ImageMagick -lMagickWand -lMagickCore -lMagickWand -lMagickCore

I was able to get past this by updating that portion of the Makefile with the following to strip out that option (believe real change would have to go into Makefile.am):

MagickWand-config --cppflags --ldflags --libs |xargs |sed "s/-fopenmp\s//"

Afterwards, I was able to get it to compile. I do not know if this negatively affects what is built, I have no intention of using the apache module. It might also be nice to be able to override whether the module is built by including an --disable option for apache (sorry if it is there and I did not see it, am terrible with autotools).

Thank you for this tool, am excited to see how much it will shave off my images!

-Mike

AerisG222 avatar Jan 01 '13 14:01 AerisG222

What's the output of

cc --version

rflynn avatar Jan 02 '13 06:01 rflynn

cc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8)

AerisG222 avatar Feb 16 '13 12:02 AerisG222

Thanks. I'll have to add proper autotools detection for openmp, though I don't know it well.

rflynn avatar Feb 21 '13 14:02 rflynn

AerisG222's fix works in src/apache2/Makefile.am, but on mine I needed the "global" flag in sed, as follows: |sed "s/-fopenmp\s//g"

ZachCallear avatar Feb 06 '14 16:02 ZachCallear

@rflynn any update on this?

bagipriyank avatar May 31 '18 00:05 bagipriyank