@asn, I’ve installed a fresh OpenSuse Tumbleweed on a VM, installed all necessary packages with zypper, and tried to compile the libgmic example from the develop
branch of the git repo.
dtschump@localhost:~/work/src/gmic/src> make OPT_CFLAGS="-flto -Ofast" OPT_LIBS="-flto" lib
make "CFLAGS+=-Dgmic_build -Dcimg_date=\\\"\\\" -Dcimg_time=\\\"\\\" -Dcimg_use_zlib -Dgmic_prerelease="\\\"200120\\\"" -std=c++11 -pedantic -Wall -Wextra -Wfatal-errors -Werror=unknown-pragmas -Werror=unused-label -Wshadow -Dcimg_use_vt100 -Dcimg_use_abort -Dgmic_is_parallel -Dcimg_use_fftw3 -Dcimg_use_curl -Dcimg_use_png -I/usr/include/libpng16 -Dcimg_use_jpeg -Dcimg_use_tiff -fopenmp -Dcimg_use_openmp -Dcimg_display=1 -flto -Ofast" "LIBS+=-L/lib64 -lz -L/usr/lib -lm -lpthread -lfftw3 -lfftw3_threads -lcurl -lpng16 -L/lib64 -lz -ljpeg -ltiff -lgomp -lX11 -lpthread -flto" _lib
make[1]: Entering directory '/home/dtschump/work/src/gmic/src'
> Retrieve CImg Library...
done!
ar rcs libgmic.a libgmic.o
g++ -shared -std=c++11 -pedantic -Wl,-soname,libgmic.so.2 -o libgmic.so libgmic.o -L/lib64 -lz -L/usr/lib -lm -lpthread -lfftw3 -lfftw3_threads -lcurl -lpng16 -L/lib64 -lz -ljpeg -ltiff -lgomp -lX11 -lpthread -flto
^Cmake[1]: *** wait: No child processes. Stop.
make[1]: *** Waiting for unfinished jobs....
make[1]: *** wait: No child processes. Stop.
make: *** wait: No child processes. Stop.
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes. Stop.
dtschump@localhost:~/work/src/gmic/src> df -k .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 19523584 6853888 12087776 37% /home
dtschump@localhost:~/work/src/gmic/src> df -k .
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 19523584 6857816 12084008 37% /home
dtschump@localhost:~/work/src/gmic/src> make OPT_CFLAGS="-flto -Ofast" OPT_LIBS="-flto" lib
make "CFLAGS+=-Dgmic_build -Dcimg_date=\\\"\\\" -Dcimg_time=\\\"\\\" -Dcimg_use_zlib -Dgmic_prerelease="\\\"200120\\\"" -std=c++11 -pedantic -Wall -Wextra -Wfatal-errors -Werror=unknown-pragmas -Werror=unused-label -Wshadow -Dcimg_use_vt100 -Dcimg_use_abort -Dgmic_is_parallel -Dcimg_use_fftw3 -Dcimg_use_curl -Dcimg_use_png -I/usr/include/libpng16 -Dcimg_use_jpeg -Dcimg_use_tiff -fopenmp -Dcimg_use_openmp -Dcimg_display=1 -flto -Ofast" "LIBS+=-L/lib64 -lz -L/usr/lib -lm -lpthread -lfftw3 -lfftw3_threads -lcurl -lpng16 -L/lib64 -lz -ljpeg -ltiff -lgomp -lX11 -lpthread -flto" _lib
make[1]: Entering directory '/home/dtschump/work/src/gmic/src'
> Retrieve CImg Library...
done!
ar rcs libgmic.a libgmic.o
g++ -shared -std=c++11 -pedantic -Wl,-soname,libgmic.so.2 -o libgmic.so libgmic.o -L/lib64 -lz -L/usr/lib -lm -lpthread -lfftw3 -lfftw3_threads -lcurl -lpng16 -L/lib64 -lz -ljpeg -ltiff -lgomp -lX11 -lpthread -flto
g++ -o use_libgmic use_libgmic.cpp -std=c++11 -pedantic -L. -lgmic -L/lib64 -lz -L/usr/lib -lm -lpthread -lfftw3 -lfftw3_threads -lcurl -lpng16 -L/lib64 -lz -ljpeg -ltiff -lgomp -lX11 -lpthread -flto
make[1]: Leaving directory '/home/dtschump/work/src/gmic/src'
dtschump@localhost:~/work/src/gmic/src> export LD_LIBRARY_PATH=.
dtschump@localhost:~/work/src/gmic/src> ln -s libgmic.so libgmic.so.2
dtschump@localhost:~/work/src/gmic/src> ./use_libgmic
- 1st step : Create input list of images.
Input image 0 = 256x256x1x3, buffer : 0x7f9a2a5da010
Input image 1 = 256x256x1x3, buffer : 0x7f9a2a519010
Input image 2 = 256x256x1x3, buffer : 0x7f9a2a458010
Input image 3 = 256x256x1x3, buffer : 0x7f9a2a397010
Input image 4 = 256x256x1x3, buffer : 0x7f9a2a2d6010
- 2st step : Call G'MIC interpreter.
[gmic]-5./ Start G'MIC interpreter.
[gmic]-5./ Add images [0,1,2,3,4].
[gmic]-1./ Normalize image [0] in range [0,255], with constant-case ratio 0.
[gmic]-1./ Apply flower deformation on image [0], with amplitude 8, frequency 6, offset 0, angle 0 deg. and center point (8,6).
[gmic]-1./ Sharpen image [0] with inverse diffusion and amplitude 100.
[gmic]-1./ Output image [0] as bmp file 'foo1.bmp' (1 image 256x256x1x3).
[gmic]-1./ End G'MIC interpreter.
- 3rd step (alternative) : Call G'MIC interpreter twice from empty instance.
[gmic]-1./ Start G'MIC interpreter.
[gmic]-1./ Blur image [0] with standard deviation 5, neumann boundary conditions and quasi-gaussian kernel.
[gmic]-1./ Sharpen image [0] with inverse diffusion and amplitude 1000.
[gmic]-1./ Normalize image [0] in range [0,255], with constant-case ratio 0.
[gmic]-1./ Output image [0] as bmp file 'foo2.bmp' (1 image 256x256x1x3).
[gmic]-1./ End G'MIC interpreter.
[gmic]-1./ Start G'MIC interpreter.
[gmic]-1./ Resize image [0] to 50%x50%x100%x100% , with nearest-neighbor interpolation, dirichlet boundary conditions and alignment (0,0,0,0).
[gmic]-1./ Force image [1] to be in RGBA mode.
[gmic]-2./ Rotate image [1] of 30 deg., with linear interpolation and dirichlet boundary conditions.
[gmic]-1./ Drop shadow behind image [1], with offsets (0,13), smoothness 5 and curvature 0.
[gmic]-1./ Apply radial blur on image [0], with amplitude 10% and center point (50%,50%).
[gmic]-2./ Blend all images [0,1] together, using 'alpha' mode and opacity 1.
[gmic]-1./ Output image [0] as bmp file 'foo3.bmp' (1 image 256x256x1x3).
[gmic]-1./ End G'MIC interpreter.
- 4th step : Returned 1 output images.
Output image 0 = 256x256x1x3, buffer : 0x1023c90
- That's it !
dtschump@localhost:~/work/src/gmic/src>
Will try with cmake
next, but the basic compilation of the lib is working as expected.