ImageMagick convert command delegate error - imagemagick

While excuting below convert command on linux getting delegate error for font .
convert -font /usr/share/fonts/type1/gsfonts/n021003l.pfb -pointsize 48 -size
400 caption:ABC text.png
convert: delegate library support not built-in '/usr/share/fonts/type1/gsfonts/n021003l.pfb' (Freetype) # warning/annotate.c/RenderFreetype/1818.
convert: no decode delegate for this image format PNG error/constitute.c/ReadImage/509.
convert: delegate library support not built-in '/usr/share/fonts/type1/gsfonts/n021003l.pfb' (Freetype) # warning/annotate.c/RenderFreetype/1818.
convert: no decode delegate for this image format PNG' # error/constitute.c/ReadImage/509.
convert: no images defined `text.png' # error/convert.c/ConvertImageCommand/3254.
Below is the output when I run the command "convert -list configure"
Path: /usr/local/lib/ImageMagick-7.0.6//config-Q16HDRI/configure.xml
Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99 -std=gnu99
CFLAGS -I/usr/include/libxml2 -fopenmp -g -O2 -Wall -mtune=core-
avx-i -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
CODER_PATH /usr/local/lib/ImageMagick-7.0.6/modules-Q16HDRI/coders
CONFIGURE ./configure
CONFIGURE_PATH /usr/local/etc/ImageMagick-7/
COPYRIGHT Copyright (C) 1999-2017 ImageMagick Studio LLC
CPPFLAGS -I/usr/local/include/ImageMagick-7
CXX g++
CXXFLAGS -g -O2 -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES mpeg ps x xml zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-jemalloc=no --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-rsvg=no --with-perl=no
DOCUMENTATION_PATH /usr/local/share/doc/ImageMagick-7
EXEC-PREFIX /usr/local
EXECUTABLE_PATH /usr/local/bin
FEATURES DPC HDRI Cipher OpenMP
FILTER_PATH /usr/local/lib/ImageMagick-7.0.6/modules-Q16HDRI/filters
GIT_REVISION 11994
HOST x86_64-unknown-linux-gnu
INCLUDE_PATH /usr/local/include/ImageMagick-7
LDFLAGS -L/usr/local/lib
LIB_VERSION 0x706
LIB_VERSION_NUMBER 7,0,6,0
LIBRARY_PATH /usr/local/lib/ImageMagick-7.0.6
LIBS -lXext -lX11 -lxml2 -lz -lm -lgomp
NAME ImageMagick
PCFLAGS -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -
DMAGICKCORE_QUANTUM_DEPTH=16
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 2017-07-17
SHARE_PATH /usr/local/share/ImageMagick-7
SHAREARCH_PATH /usr/local/lib/ImageMagick-7.0.6/config-Q16HDRI
TARGET_CPU x86_64
TARGET_OS linux-gnu
TARGET_VENDOR unknown
VERSION 7.0.6
WEBSITE http://www.imagemagick.org
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
FEATURES OpenMP
NAME ImageMagick
QuantumDepth 16'
When tried to run the "identify -list font" command it has support for the font which is used in convert command here.
Font: Times-Roman
family: Times
style: Normal
stretch: Normal
weight: 400
glyphs: /usr/share/fonts/type1/gsfonts/n021003l.pfb
Any help appreciated . Thanks.

The issue is that the font is a freetype one and you have not got the freetype delegate installed - it is not listed under DELEGATES in your identify -list configure or if you run identify -version. You need to install it.

Related

How can I strip symbols from my executable when using Clang and the LLVM ELF ld.LLD linker?

I am building with Clang 9.0.0 and linking with the ld.lld linker
clang++.exe -Wall -fexceptions -m64 -O3 -Xclang -flto-visibility-public-std -std=c++2a -flto=thin -c
I:\Cpp\hello_boost\hello_codeblocks_world\hello_codeblocks_world.cpp -o obj\release\hello_codeblocks_world.o
clang++.exe -o bin\release\hello_codeblocks_world.exe obj\release\hello_codeblocks_world.o -m64 -fuse-ld=lld --strip-all
but, unlike when using the usual GCC linker LD, this option (--strip-all or -s) is not recognized
clang++: error: unsupported option '--strip-all' (or similarly with -s)
Can anyone suggest what I should be doing to strip symbols?
(My release-mode hello_world.exe size is 15 kb for GC but 230 kB for Clang :-( and this is likely to have some adverse effects for no benefit).
Is this not an option for ld.lld ?
Thanks
You might want to use:
-Xlinker --strip-all
You can use this to supply system-specific linker options that GCC does not recognize (gcc manual)
https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html

Why clang produced "argument unused" warning for -nostdinc++ for executables, but not for libraries

I'm needing to use custom libc++ so I'm passing -nostdinc++ for CMAKE_CXX_FLAGS. This works fine for libraries but for executables, I get this warning:
clang: warning: argument unused during compilation: '-nostdinc++' [-Wunused-command-line-argument]
Question: Why?
More details
My CMAKE_CXX_FLAGS flags passed to compiler are:
set(CMAKE_CXX_FLAGS "-nostdinc++ -isystem ${LIBCXX_INC_PATH}")
My CMAKE_EXE_LINKER_FLAGS flags passed to linked are:
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++ -lc++abi -lm -lc -lgcc_s -lgcc -ldl -Wl,-rpath,${LIBCXX_LIB_PATH}")
Clang verbos output:
Scanning dependencies of target DroneServer
[ 98%] Building CXX object DroneServer/CMakeFiles/DroneServer.dir/home/shitals/GitHubSrc/AirSim/DroneServer/main.cpp.o
clang version 3.9.1-4ubuntu3~16.04.1 (tags/RELEASE_391/rc2)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;#m64
Selected multilib: .;#m64
"/usr/lib/llvm-3.9/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name main.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -v -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -coverage-file /home/shitals/GitHubSrc/AirSim/build_debug/DroneServer/CMakeFiles/DroneServer.dir/home/shitals/GitHubSrc/AirSim/DroneServer/main.cpp.o -nostdinc++ -resource-dir /usr/lib/llvm-3.9/bin/../lib/clang/3.9.1 -isystem /home/shitals/GitHubSrc/AirSim/llvm-build/output/include/c++/v1 -I /home/shitals/GitHubSrc/AirSim/eigen/eigen3 -I /home/shitals/GitHubSrc/AirSim/DroneServer -I /home/shitals/GitHubSrc/AirSim/MavLinkCom/include -I /home/shitals/GitHubSrc/AirSim/external/rpclib/include -I /home/shitals/GitHubSrc/AirSim/AirLib/include -D __CLANG__ -D MSGPACK_PP_VARIADICS_MSVC=0 -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm-3.9/bin/../lib/clang/3.9.1/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Wall -Wextra -Wstrict-aliasing -Wunreachable-code -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-include-dirs -Wswitch-default -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wstrict-overflow=5 -Wswitch-default -Wundef -Wno-variadic-macros -Wno-parentheses -Wno-unused-function -Wno-unused -Wno-documentation -std=c++14 -fdeprecated-macro -fdebug-compilation-dir /home/shitals/GitHubSrc/AirSim/build_debug/DroneServer -ferror-limit 10 -fmessage-length 286 -pthread -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o CMakeFiles/DroneServer.dir/home/shitals/GitHubSrc/AirSim/DroneServer/main.cpp.o -x c++ /home/shitals/GitHubSrc/AirSim/DroneServer/main.cpp
clang -cc1 version 3.9.1 based upon LLVM 3.9.1 default target x86_64-pc-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/home/shitals/GitHubSrc/AirSim/eigen/eigen3
/home/shitals/GitHubSrc/AirSim/DroneServer
/home/shitals/GitHubSrc/AirSim/MavLinkCom/include
/home/shitals/GitHubSrc/AirSim/external/rpclib/include
/home/shitals/GitHubSrc/AirSim/AirLib/include
/home/shitals/GitHubSrc/AirSim/llvm-build/output/include/c++/v1
/usr/local/include
/usr/lib/llvm-3.9/bin/../lib/clang/3.9.1/include
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
[100%] Linking CXX executable ../output/bin/DroneServer
clang version 3.9.1-4ubuntu3~16.04.1 (tags/RELEASE_391/rc2)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;#m64
Selected multilib: .;#m64
clang: warning: argument unused during compilation: '-nostdinc++' [-Wunused-command-line-argument]
"/usr/bin/ld" -z relro --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o ../output/bin/DroneServer /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crt1.o /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crti.o /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/crtbegin.o -L/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0 -L/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../.. -L/usr/lib/llvm-3.9/bin/../lib -L/lib -L/usr/lib -lc++ -lc++abi -lm -lc -lgcc_s -lgcc -ldl -rpath /home/shitals/GitHubSrc/AirSim/llvm-build/output/lib CMakeFiles/DroneServer.dir/home/shitals/GitHubSrc/AirSim/DroneServer/main.cpp.o -lpthread ../output/lib/libAirLib.a ../output/lib/libMavLinkCom.a ../output/lib/libAirSim-rpclib.a -lpthread -lpthread -lc++ -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/crtend.o /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu/crtn.o
[100%] Built target DroneServer

Unable to use installed font with ImageMagick

I am using OS X 10.10.3 and installed ImageMagick using Homebrew.
I'm trying out ImageMagick to create a dynamic image generation script but I'm getting a font related error message. This is the command I use, which is an example taken from ImageMagick's Font Effect page. What can I do so that I can use the font installed on my machine with ImageMagick? The fonts are either TrueType or PostScript.
convert -size 320x100 xc:lightblue -font Arial -pointsize 72 \
-fill navy -annotate +25+65 'Anthony' \
-distort Arc 120 -trim +repage \
-bordercolor lightblue -border 10 /outputdirectory/font_arc.jpg
And this is the error message it returns.
convert: delegate library support not built-in `/Library/Fonts/Arial.ttf' (Freetype) # warning/annotate.c/RenderFreetype/1560.
Below is the output when I run the command "convert -list configure"
Path: /opt/ImageMagick/lib/ImageMagick-6.9.1//config-Q16/configure.xml
Name Value
-------------------------------------------------------------------------------
CC gcc
CFLAGS -D_THREAD_SAFE -D_THREAD_SAFE -pthread -mmacosx-version-min=10.5 -Wall -march=core2 -fexceptions -D_FORTIFY_SOURCE=0 -D_THREAD_SAFE -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
CODER_PATH /opt/ImageMagick/lib/ImageMagick-6.9.1/modules-Q16/coders
CONFIGURE ./configure '--prefix' '/opt/ImageMagick' '--enable-delegate-build' '--enable-opencl' '--without-x' '--without-freetype' '--disable-static' 'CFLAGS=-mmacosx-version-min=10.5'
CONFIGURE_PATH /opt/ImageMagick/etc/ImageMagick-6/
COPYRIGHT Copyright (C) 1999-2015 ImageMagick Studio LLC
CPPFLAGS -I/opt/ImageMagick/include/ImageMagick-6
CXX g++
CXXFLAGS -g -O2 -D_THREAD_SAFE -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib mpeg fftw jng jpeg lcms lzma png ps tiff webp xml zlib
DISTCHECK_CONFIG_FLAGS 'CFLAGS=-mmacosx-version-min=10.5' --disable-deprecated --with-quantum-depth=16 --with-jemalloc=no --with-umem=no --with-autotrace=no --with-freetype=no --with-gslib=no --with-fontpath= --with-gvc=no --with-rsvg=no --with-wmf=no --with-perl=no
DOCUMENTATION_PATH /opt/ImageMagick/share/doc/ImageMagick-6
EXEC-PREFIX /opt/ImageMagick
EXECUTABLE_PATH /opt/ImageMagick/bin
FEATURES DPC OpenCL
FILTER_PATH /opt/ImageMagick/lib/ImageMagick-6.9.1/modules-Q16/filters
HOST x86_64-apple-darwin14.1.0
INCLUDE_PATH /opt/ImageMagick/include/ImageMagick-6
LDFLAGS -L/opt/ImageMagick/lib -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/fftw/.libs -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/fftw -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/jp2 -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/jpeg/.libs -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/jpeg -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/lcms/src/.libs -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/lcms/src -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/lzma/.libs -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/lzma -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/magick -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/png/.libs -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/png -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/tiff/libtiff/.libs -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/tiff/libtiff -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/wand -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/webp/.libs -L/Users/karlvr/Development/ImageMagick/ImageMagick-6.9.1-0/webp -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib
LIB_VERSION 0x691
LIB_VERSION_NUMBER 6,9,1,0
LIBRARY_PATH /opt/ImageMagick/lib/ImageMagick-6.9.1
LIBS -llcms -ltiff -ljpeg -lpng15 -lfftw3 -lwebp -L/usr/local/Cellar/xz/5.2.1/lib -llzma -lbz2 -lxml2 -lz -lm -Wl,-framework,OpenCL -lm
NAME ImageMagick
PCFLAGS -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
PREFIX /opt/ImageMagick
QuantumDepth 16
RELEASE_DATE 2015-03-22
SHARE_PATH /opt/ImageMagick/share/ImageMagick-6
SHAREARCH_PATH /opt/ImageMagick/lib/ImageMagick-6.9.1/config-Q16
SVN_REVISION 18245
TARGET_CPU x86_64
TARGET_OS darwin14.1.0
TARGET_VENDOR apple
VERSION 6.9.1
WEBSITE http://www.imagemagick.org
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
FEATURES
NAME ImageMagick
QuantumDepth 16
And finally this is the result of "brew info imagemagick".
imagemagick: stable 6.9.1-3 (bottled), HEAD
http://www.imagemagick.org
/usr/local/Cellar/imagemagick/6.9.1-3 (1444 files, 21M) *
Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/imagemagick.rb
==> Dependencies
Build: xz ✔, pkg-config ✔
Required: xz ✔, libtool ✔
Recommended: jpeg ✔, libpng ✔, freetype ✔
Optional: fontconfig ✔, libtiff ✔, little-cms ✘, little-cms2 ✔, libwmf ✘, librsvg ✘, liblqr ✘, openexr ✘, ghostscript ✔, webp ✘, fftw ✘, pango ✘
Adding to the above, here is a result from "identify -list format" for TrueType and PostScript fonts.
PFA* TTF r-- Postscript Type 1 font (ASCII) (Freetype 2.5.5)
PFB* TTF r-- Postscript Type 1 font (binary) (Freetype 2.5.5)
TTC* TTF r-- TrueType font collection (Freetype 2.5.5)
TTF* TTF r-- TrueType font (Freetype 2.5.5)
Any suggestions would be very much appreciated.
Try
identify -list font
to see what fonts you have available to you. If none, have a look at my answer here.

Image conversion from IFF and EXR formats to JPEG format

I am using convert Desktop/iff_image.iff Desktop/iff_image.jpg to convert my images to JPEG format.
But getting as
convert: no decode delegate for this image format `Desktop/iff_image.iff' # error/constitute.c/ReadImage/552.
convert: no images defined `Desktop/iff_image.jpg' # error/convert.c/ConvertImageCommand/3127.
For .tif, .tiff, .cin, .dpx extensions it is working properly.
The issue is coming only for .iff and .exr extensions.
IFF
I am not familiar with a format named 'IFF'. Sorry to be of no help for this one...
EXR
For support of reading and writing the EXR format, your ImageMagick installation needs to have...
...access to the OpenEXR library (which also must be installed on your system);
...been built with support for the OpenEXR delegate.
In ImageMagick, 'delegates' are external programs or helper utilities which support ImageMagick to handle formats which it cannot handle on its own.
One of the most common delegates found in ImageMagick is Ghostscript. Ghostscript is required to process PDF or PostScript input files, because ImageMagick can only handle raster formats. So Ghostscript converts PDFs and PS to raster images on behalf of ImageMagick, then hands over these raster data to IM, which then does the rest of the required work.
To print the list of all built-in delegates, run this command (on Linux or Mac OS X):
convert -version | grep Delegates
The respective Windows command is:
convert -version | findstr Delegates
The output I see on my system for this command is this:
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib gvc jbig \
jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png \
ps rsvg tiff webp wmf x xml zlib
The list of supported delegates should have openexr amongst them. If it is not there, you need to install a version of ImageMagick that has it.
To check which compile-time options have been used to build your version of ImageMagick, run
convert -list configure
If the linen starting DELEGATES does not list openexr, the binary package for your system has not been built with OpenEXR in mind. If it is listed, but still not working, something else is wrong...
On my system, I see this:
Path: /opt/local/lib/ImageMagick-6.9.0//config-Q16/configure.xml
Name Value
-------------------------------------------------------------------------------
CC /usr/bin/clang
CFLAGS -I/opt/local/include/lqr-1 -I/opt/local/include/glib-2.0 \
-I/opt/local/lib/glib-2.0/include -I/opt/local/include \
-I/opt/local/include/freetype2 -I/opt/local/include \
-I/opt/local/include/libpng16 -pipe -Os -arch x86_64 \
-Wall -march=corei7-avx -fexceptions -D_FORTIFY_SOURCE=0 \
-D_THREAD_SAFE -pthread -DMAGICKCORE_HDRI_ENABLE=0 \
-DMAGICKCORE_QUANTUM_DEPTH=16
CODER_PATH /opt/local/lib/ImageMagick-6.9.0/modules-Q16/coders
CONFIGURE ./configure '--prefix=/opt/local' '--enable-shared' \
'--enable-static' '--disable-ltdl-install' \
'--disable-silent-rules' '--with-frozenpaths' \
'--with-openexr' '--disable-hdri' '--with-dps' \
'--with-bzlib' '--with-djvu' '--with-fontconfig' \
'--with-gslib' '--with-jbig' '--with-jpeg' '--with-lcms' \
'--with-openjp2' '--with-png' '--with-tiff' '--with-webp' \
'--with-zlib' '--with-modules' '--with-xml' \
'--without-perl' '--without-fpx' '--with-wmf' \
'--with-gvc' '--with-rsvg' '--with-lqr' '--with-pango' \
'--with-x' '--with-gs-font-dir=/opt/local/share/fonts/urw-fonts' \
'CC=/usr/bin/clang' 'CFLAGS=-pipe -Os -arch x86_64' \
'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names \
-arch x86_64' 'CPPFLAGS=-I/opt/local/include' \
'CXX=/usr/bin/clang++' 'CXXFLAGS=-pipe -Os -arch x86_64 \
-stdlib=libc++'
CONFIGURE_PATH /opt/local/etc/ImageMagick-6/
COPYRIGHT Copyright (C) 1999-2014 ImageMagick Studio LLC
CPPFLAGS -I/opt/local/include/ImageMagick-6
CXX /usr/bin/clang++
CXXFLAGS -pipe -Os -arch x86_64 -stdlib=libc++ -D_THREAD_SAFE -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib djvu mpeg fftw fontconfig freetype gslib jbig jng jpeg lcms \
lqr lzma openexr openjp2 pango png ps rsvg tiff webp wmf x xml zlib
DISTCHECK_CONFIG_FLAGS 'CC=/usr/bin/clang' 'CFLAGS=-pipe -Os -arch x86_64' \
'CPPFLAGS=-I/opt/local/include' 'CXX=/usr/bin/clang++' \
'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names \
-arch x86_64' --disable-deprecated --with-quantum-depth=16 \
--with-jemalloc=no --with-umem=no --with-autotrace=no \
--with-fpx=no --with-fontpath= --with-gs-font-dir=/opt/local/share/fonts/urw-fonts \
--with-perl=no
DOCUMENTATION_PATH /opt/local/share/doc/ImageMagick-6
EXEC-PREFIX /opt/local
EXECUTABLE_PATH /opt/local/bin
FEATURES DPC Modules
FILTER_PATH /opt/local/lib/ImageMagick-6.9.0/modules-Q16/filters
HOST x86_64-apple-darwin13.4.0
INCLUDE_PATH /opt/local/include/ImageMagick-6
LDFLAGS -L/opt/local/lib -L/opt/local/lib -Wl,-headerpad_max_install_names \
-arch x86_64 -L/opt/local/lib -L/opt/local/lib
LIB_VERSION 0x690
LIB_VERSION_NUMBER 6,9,0,0
LIBRARY_PATH /opt/local/lib/ImageMagick-6.9.0
LIBS -llcms2 -L/opt/local/lib -lfreetype -L/opt/local/lib -llqr-1 \
-lglib-2.0 -lintl -lfftw3 -L/opt/local/lib -lfontconfig -lfreetype \
-lXext -lSM -lICE -lX11 -lXt -L/opt/local/lib -llzma -lbz2 -lz \
-lltdl -lm
NAME ImageMagick
PCFLAGS -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
PREFIX /opt/local
QuantumDepth 16
RELEASE_DATE 2014-12-06
SHARE_PATH /opt/local/share/ImageMagick-6
SHAREARCH_PATH /opt/local/lib/ImageMagick-6.9.0/config-Q16
SVN_REVISION 17068
TARGET_CPU x86_64
TARGET_OS darwin13.4.0
TARGET_VENDOR apple
VERSION 6.9.0
WEBSITE http://www.imagemagick.org
Path: [built-in]
Name Value
----------------------------------------------------------------------------
FEATURES
NAME ImageMagick
QuantumDepth 16

clang -S -emit-llvm and then compile

I want to get exe with clang and llvm with two ways:
clang -O2 1.c -o 1.exe
clang -S -emit-llvm 1.c
llc 1.ll -filetype=obj
link 1.obj -defaultlib: ??? (MSVCRT or libcmt)
but exe files will different and first exe will faster, how to do it equal?
Or how to see what clang use like defaultlib?
hard: windows 64.
You can add the -v flag on your first command line to see the linker invocation clang will use to build your program. As to the first executable being faster, that could be because you didn't pass any optimization flags in your second case.
I don't have a Windows machine handy, but here's some example output from my mac:
$ clang -v -O2 1.c -o 1.exe
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.9.0 -emit-obj -disable-free -disable-llvm-verifier -main-file-name 1.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 236.3 -v -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1 -O2 -fdebug-compilation-dir /Users/carl/Desktop/example -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.9.0 -fencode-extended-block-signature -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /var/folders/mk/0mblc5810cjgs0nylrkjxqbm0000gq/T/1-7ac5d9.o -x c 1.c
clang -cc1 version 5.1 based upon LLVM 3.4svn default target x86_64-apple-darwin13.3.0
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.9.0 -o 1.exe /var/folders/mk/0mblc5810cjgs0nylrkjxqbm0000gq/T/1-7ac5d9.o -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/5.1/lib/darwin/libclang_rt.osx.a
You can see the link line down at the bottom. Broken down for readability, its:
ld
-demangle
-dynamic
-arch x86_64
-macosx_version_min 10.9.0
-o 1.exe
$(OBJECT_FILE)
-lSystem
libclang_rt.osx.a

Resources