Replies: 2 comments 7 replies
-
The build has not been tested on Linux (as per the FAQ entry), so I'd try using Windows to build it first of all. Alternatively, you could get github to build it for you, or try the docker image. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your response and guidance on my previous query. Following your advice, I initiated a fully static build from the ImageMagick GitHub repository. I used the --enable-static=yes option in the configure-any.sh script to ensure a static build. However, I have a question regarding the static libraries. In the binaries attached to the repository, I noticed the absence of static libraries like libmagick++, libMagicCore, or libMagicWand. I'm trying to understand whether these static libraries are indeed part of the provided binaries, and perhaps I'm just not locating them correctly. Could you please shed some light on this? Do these static libraries exist in the repo, or are they not included in the binaries for some reason? Any clarification on this would be very helpful. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
I'm working on a project where I need to cross compile and build static libraries for Magick++, MagickCore, and MagickWand for arm64, to integrate with my existing Android project.
I've set up my environment variables and configured ImageMagick 7.1.1-25 for my host (aarch64-unknown-linux-android) and build (x86_64-pc-linux-gnu) systems. Here's a summary of my configuration:
Shared libraries: disabled
Static libraries: enabled
Various other options like OpenMP, security policy, and quantum depth are set as per requirements.
Libraries like JPEG, PNG, TIFF, etc., are enabled.
The issue arises when I run 'make'. I encounter build errors related to the __GNUC_PREREQ macro not being defined. It seems the problem is due to the inclusion of x86_64 specific headers in the CFLAGS. For instance, -I/usr/include/x86_64-linux-gnu is present, which shouldn't be for arm64.
I believe this incorrect path inclusion is causing the errors, but I'm not sure how to remove or correct these auto-included x86_64 paths in the CFLAGS.
Has anyone here successfully compiled fully static for ImageMagick targeting arm64 on Android if so could you please share it?
I'd also greatly appreciate any guidance or suggestions especially on how to fix the CFLAGS to be appropriate for arm64.
Thank you in advance for your help!
Summary of configure env for reference:
ImageMagick 7.1.1-25 is configured as follows. Verify that this configuration
matches your expectations.
Host system type: aarch64-unknown-linux-android
Build system type: x86_64-pc-linux-gnu
Shared libraries --enable-shared=no no
Static libraries --enable-static=yes yes
Build utilities --with-utilities=yes yes
Module support --with-modules=no no
GNU ld --with-gnu-ld=yes yes
OpenMP --enable-openmp= yes
Security policy --with-security-policy=open open
Quantum depth --with-quantum-depth=16 16
Channel mask depth --enable-64bit-channel-masks=no 32
High Dynamic Range Imagery
--enable-hdri=yes yes
Install documentation: yes
Memory allocation library:
JEMalloc --with-jemalloc=no no
MTMalloc --with-mtmalloc=no no
TCMalloc --with-tcmalloc=no no
UMem --with-umem=no no
Delegate library configuration:
BZLIB --with-bzlib=yes no
Autotrace --with-autotrace=no no
DJVU --with-djvu=yes yes
DPS --with-dps=no no
FFTW --with-fftw=no no
FLIF --with-flif=no no
FlashPIX --with-fpx=no no
FontConfig --with-fontconfig=yes yes
FreeType --with-freetype=yes yes
Ghostscript lib --with-gslib=no no
Graphviz --with-gvc=yes no
HEIC --with-heic=yes no
JBIG --with-jbig=yes no
JPEG v1 --with-jpeg=yes yes
JPEG XL --with-jxl=yes no
DMR --with-dmr=yes no
LCMS --with-lcms=yes yes
LQR --with-lqr=yes yes
LTDL --with-ltdl=no no
LZMA --with-lzma=yes yes
Magick++ --with-magick-plus-plus=yes yes
OpenEXR --with-openexr=yes yes
OpenJP2 --with-openjp2=yes yes
PANGO --with-pango=yes yes
PERL --with-perl=no no
PNG --with-png=yes yes
RAQM --with-raqm=yes no
RAW --with-raw=yes no
RSVG --with-rsvg=no no
TIFF --with-tiff=yes yes
WEBP --with-webp=yes no
WMF --with-wmf=no no
X11 --with-x= no
XML --with-xml=yes yes
ZIP --with-zip=yes no
ZLIB --with-zlib=yes yes
ZSTD --with-zstd=yes no
Delegate program configuration:
GhostPCL None pcl6 (unknown)
GhostXPS None gxps (unknown)
Ghostscript None gs (9.55.0)
Font configuration:
Apple fonts --with-apple-font-dir=default
Dejavu fonts --with-dejavu-font-dir=default none
Ghostscript fonts --with-gs-font-dir=default /usr/share/fonts/type1/gsfonts/
URW-base35 fonts --with-urw-base35-font-dir=default none
Windows fonts --with-windows-font-dir=default none
X11 configuration:
X_CFLAGS =
X_PRE_LIBS =
X_LIBS =
X_EXTRA_LIBS =
Options used to compile and link:
PREFIX = /usr/local
EXEC-PREFIX = /usr/local
VERSION = 7.1.1-25
CC = ...ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang
CFLAGS = -I/usr/include/libxml2 -I/usr/include/x86_64-linux-gnu -I/usr/include/libpng16 -pthread -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/OpenEXR -I/usr/include/lqr-1 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/openjpeg-2.4 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -pthread -fopenmp -Wall -g -O2 -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32
CPPFLAGS = -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32
PCFLAGS =
DEFS = -DHAVE_CONFIG_H
LDFLAGS =
LIBS = -llcms2 -ltiff -lfreetype -ljpeg -llqr-1 -lglib-2.0 -lpng16 -lz -ldjvulibre -lfontconfig -lfreetype -llzma -lIlmImf-2_5 -lImath-2_5 -lHalf-2_5 -lIex-2_5 -lIexMath-2_5 -lIlmThread-2_5 -lopenjp2 -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lcairo -lxml2 -lz -lm -lomp
CXX = .../ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang++
CXXFLAGS = -g -O2 -pthread
FEATURES = Channel-masks(32-bit) Cipher DPC HDRI OpenMP
DELEGATES = djvu fontconfig freetype jng jp2 jpeg lcms lqr lzma openexr pangocairo png ps tiff xml zlib
Error seen when I run 'make':
/usr/include/x86_64-linux-gnu/sys/cdefs.h:202:5: error: function-like macro '__GNUC_PREREQ' is not defined
#if __GNUC_PREREQ (4,3)
Beta Was this translation helpful? Give feedback.
All reactions