No decode delegate for ImageMagick - linux

I am try to compress the JPEG file and installed ImageMagick on Linux machine. PFB.
Below is the convert command looks like.
Any idea to fix it?
Below are logs :
No package 'pango' found
configure:32506: result:
configure:32565: result: -------------------------------------------------------------
configure:32569: checking for PNG
configure:32576: $PKG_CONFIG --exists --print-errors "libpng >= 1.0.0"
configure:32579: $? = 0
configure:32593: $PKG_CONFIG --exists --print-errors "libpng >= 1.0.0"
configure:32596: $? = 0
configure:32634: result: yes
configure:32638: result:
configure:32682: result: -------------------------------------------------------------
configure:32686: checking for RAW_R
configure:32693: $PKG_CONFIG --exists --print-errors "libraw_r >= 0.14.8"
Package libraw_r was not found in the pkg-config search path.
Perhaps you should add the directory containing `libraw_r.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libraw_r' found
configure:32696: $? = 1
configure:32710: $PKG_CONFIG --exists --print-errors "libraw_r >= 0.14.8"
Package libraw_r was not found in the pkg-config search path.
Perhaps you should add the directory containing `libraw_r.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libraw_r' found
configure:32713: $? = 1
configure:32727: result: no
No package 'libraw_r' found
configure:32755: result:
configure:33003: result: -------------------------------------------------------------
configure:33005: checking for TIFF
configure:33007: result:
configure:33011: checking tiff.h usability
configure:33011: gcc -std=gnu99 -std=gnu99 -c -I/usr/include/libpng15 -fopenmp -g -O2 -Wall -mtune=corei7 -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 conftest.c >&5
conftest.c:260:18: fatal error: tiff.h: No such file or directory
#include <tiff.h>
^
compilation terminated.
configure:33011: $? = 1
configure: failed program was:

Compile it in.
./configure -with-png=yes \
--with-jpeg=yes \
--with-jp2=yes \
--with-freetype=yes
From
http://www.imagemagick.org/discourse-server/viewtopic.php?t=22086.

Related

Issue installing any Python version 3.8+ since macOS Monterey update

Prior to the Monterey update, I had a fairly stable method of running x86 versions of Python (3.8, and 3.10) on my M1 Mac by adapting these instructions (basically, arch -x86_64 brew to install x86 versions of Python dependencies and using arch -x86_64 pyenv to install Python).
Since Monterey, whenever I try to install a different version of Python 3.8+ (e.g. 3.9.11), I get this error:
BUILD FAILED (OS X 12.3 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/q6/w2pgnv455zx_swdp919_zsww0000gn/T/python-build.20220324065050.66757
Results logged to /var/folders/q6/w2pgnv455zx_swdp919_zsww0000gn/T/python-build.20220324065050.66757.log
Last 10 log lines:
"_libintl_textdomain", referenced from:
_PyIntl_textdomain in libpython3.9.a(_localemodule.o)
_PyIntl_textdomain in libpython3.9.a(_localemodule.o)
ld: symbol(s) not found for architecture x86_64
ld: symbol(s) not found for architecture x86_64
clang: clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Programs/_testembed] Error 1
make: *** Waiting for unfinished jobs....
make: *** [python.exe] Error 1
I am struggling to find anything significant in the corresponding config.log (top lines included):
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by python configure 3.9, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/Users/joshualee/.pyenv/versions/3.9.11_x86 --libdir=/Users/joshualee/.pyenv/versions/3.9.11_x86/lib --with-openssl=/opt/homebrew/opt/openssl#1.1
## --------- ##
## Platform. ##
## --------- ##
hostname = Macbook-Pro-2.local
uname -m = x86_64
uname -r = 21.4.0
uname -s = Darwin
uname -v = Darwin Kernel Version 21.4.0: Mon Feb 21 20:35:58 PST 2022; root:xnu-8020.101.4~2/RELEASE_ARM64_T6000
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 21.4.0: Mon Feb 21 20:35:58 PST 2022; root:xnu-8020.101.4~2/RELEASE_ARM64_T6000
Kernel configured for up to 10 processors.
10 processors are physically available.
10 processors are logically available.
Processor type: i486 (Intel 80486)
Processors active: 0 1 2 3 4 5 6 7 8 9
Primary memory available: 16.00 gigabytes
Default processor set: 515 tasks, 2684 threads, 10 processors
Load average: 2.49, Mach factor: 7.50
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /opt/homebrew/Cellar/pyenv/2.2.5/libexec
PATH: /opt/homebrew/Cellar/pyenv/2.2.5/plugins/python-build/bin
PATH: /Users/joshualee/.pyenv/shims
PATH: /opt/homebrew/bin
PATH: /opt/homebrew/sbin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /Users/joshualee/.local/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2860: checking build system type
configure:2874: result: x86_64-apple-darwin21.4.0
configure:2894: checking host system type
configure:2907: result: x86_64-apple-darwin21.4.0
configure:2937: checking for python3.9
configure:2967: result: no
configure:2937: checking for python3
configure:2953: found /Users/joshualee/.pyenv/shims/python3
configure:2964: result: python3
configure:3058: checking for --enable-universalsdk
configure:3105: result: no
configure:3129: checking for --with-universal-archs
configure:3144: result: no
configure:3300: checking MACHDEP
configure:3351: result: "darwin"
configure:3645: checking for gcc
configure:3672: result: clang
configure:3901: checking for C compiler version
configure:3910: clang --version >&5
Apple clang version 13.1.6 (clang-1316.0.21.2)
Target: x86_64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
configure:3921: $? = 0
configure:3910: clang -v >&5
Apple clang version 13.1.6 (clang-1316.0.21.2)
Target: x86_64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
configure:3921: $? = 0
configure:3910: clang -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:3921: $? = 1
configure:3910: clang -qversion >&5
clang: error: unknown argument '-qversion'; did you mean '--version'?
clang: error: no input files
configure:3921: $? = 1
configure:3941: checking whether the C compiler works
configure:3963: clang -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/openssl#3/include -I/usr/local/opt/xz/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/readline/include -I/Users/joshualee/.pyenv/versions/3.9.11_x86/include -I/opt/homebrew/include -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/readline/lib -L/Users/joshualee/.pyenv/versions/3.9.11_x86/lib -L/usr/local/opt/openssl#3/lib -L/usr/local/opt/xz/lib -L/opt/homebrew/lib -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib conftest.c >&5
ld: warning: directory not found for option '-L/Users/joshualee/.pyenv/versions/3.9.11_x86/lib'
configure:3967: $? = 0
configure:4015: result: yes
configure:4018: checking for C compiler default output file name
configure:4020: result: a.out
configure:4026: checking for suffix of executables
configure:4033: clang -o conftest -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/openssl#3/include -I/usr/local/opt/xz/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/readline/include -I/Users/joshualee/.pyenv/versions/3.9.11_x86/include -I/opt/homebrew/include -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/readline/lib -L/Users/joshualee/.pyenv/versions/3.9.11_x86/lib -L/usr/local/opt/openssl#3/lib -L/usr/local/opt/xz/lib -L/opt/homebrew/lib -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib conftest.c >&5
ld: warning: directory not found for option '-L/Users/joshualee/.pyenv/versions/3.9.11_x86/lib'
configure:4037: $? = 0
configure:4059: result:
configure:4081: checking whether we are cross compiling
configure:4089: clang -o conftest -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/openssl#3/include -I/usr/local/opt/xz/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/readline/include -I/Users/joshualee/.pyenv/versions/3.9.11_x86/include -I/opt/homebrew/include -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/readline/lib -L/Users/joshualee/.pyenv/versions/3.9.11_x86/lib -L/usr/local/opt/openssl#3/lib -L/usr/local/opt/xz/lib -L/opt/homebrew/lib -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib conftest.c >&5
ld: warning: directory not found for option '-L/Users/joshualee/.pyenv/versions/3.9.11_x86/lib'
configure:4093: $? = 0
configure:4100: ./conftest
configure:4104: $? = 0
configure:4119: result: no
configure:4124: checking for suffix of object files
configure:4146: clang -c -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/openssl#3/include -I/usr/local/opt/xz/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/readline/include -I/Users/joshualee/.pyenv/versions/3.9.11_x86/include -I/opt/homebrew/include conftest.c >&5
configure:4150: $? = 0
configure:4171: result: o
configure:4175: checking whether we are using the GNU C compiler
configure:4194: clang -c -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/openssl#3/include -I/usr/local/opt/xz/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/readline/include -I/Users/joshualee/.pyenv/versions/3.9.11_x86/include -I/opt/homebrew/include conftest.c >&5
configure:4194: $? = 0
configure:4203: result: yes
configure:4212: checking whether clang accepts -g
configure:4232: clang -c -g -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/readline/include -I/Users/joshualee/.pyenv/versions/3.9.11_x86/include -I/opt/homebrew/include conftest.c >&5
configure:4232: $? = 0
configure:4273: result: yes
configure:4290: checking for clang option to accept ISO C89
configure:4353: clang -c -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/openssl#3/include -I/usr/local/opt/xz/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/readline/include -I/Users/joshualee/.pyenv/versions/3.9.11_x86/include -I/opt/homebrew/include conftest.c >&5
configure:4353: $? = 0
configure:4366: result: none needed
configure:4391: checking how to run the C preprocessor
configure:4422: clang -E -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/readline/include -I/Users/joshualee/.pyenv/versions/3.9.11_x86/include -I/opt/homebrew/include conftest.c
configure:4422: $? = 0
configure:4436: clang -E -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/readline/include -I/Users/joshualee/.pyenv/versions/3.9.11_x86/include -I/opt/homebrew/include conftest.c
conftest.c:8:10: fatal error: 'ac_nonexistent.h' file not found
#include <ac_nonexistent.h>
^~~~~~~~~~~~~~~~~~
1 error generated.
configure:4436: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define _GNU_SOURCE 1
| #define _NETBSD_SOURCE 1
| #define __BSD_VISIBLE 1
| #define _DARWIN_C_SOURCE 1
| #define _PYTHONFRAMEWORK ""
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:4461: result: clang -E
configure:4481: clang -E -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/readline/include -I/Users/joshualee/.pyenv/versions/3.9.11_x86/include -I/opt/homebrew/include conftest.c
configure:4481: $? = 0
configure:4495: clang -E -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/readline/include -I/Users/joshualee/.pyenv/versions/3.9.11_x86/include -I/opt/homebrew/include conftest.c
conftest.c:8:10: fatal error: 'ac_nonexistent.h' file not found
#include <ac_nonexistent.h>
^~~~~~~~~~~~~~~~~~
1 error generated.
configure:4495: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define _GNU_SOURCE 1
| #define _NETBSD_SOURCE 1
| #define __BSD_VISIBLE 1
| #define _DARWIN_C_SOURCE 1
| #define _PYTHONFRAMEWORK ""
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:4523: checking for grep that handles long lines and -e
configure:4581: result: /usr/bin/grep
configure:4586: checking for a sed that does not truncate output
configure:4650: result: /usr/bin/sed
configure:4658: checking for --with-cxx-main=<compiler>
configure:4684: result: no
configure:4933: checking for clang++
configure:4966: result: no
configure:5202:
By default, distutils will build C++ extension modules with "clang++".
If this is not intended, then set CXX on the configure command line.
configure:5211: checking for the platform triplet based on compiler characteristics
configure:5361: result: darwin
configure:5369: checking for multiarch
configure:5381: result:
configure:5398: checking for -Wl,--no-as-needed
configure:5414: clang -o conftest -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/usr/local/opt/openssl#3/include -I/usr/local/opt/xz/include -I/opt/homebrew/opt/readline/include -I/opt/homebrew/opt/readline/include -I/Users/joshualee/.pyenv/versions/3.9.11_x86/include -I/opt/homebrew/include -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/opt/readline/lib -L/Users/joshualee/.pyenv/versions/3.9.11_x86/lib -L/usr/local/opt/openssl#3/lib -L/usr/local/opt/xz/lib -L/opt/homebrew/lib -L/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib -Wl,--no-as-needed conftest.c >&5
ld: warning: directory not found for option '-L/Users/joshualee/.pyenv/versions/3.9.11_x86/lib'
ld: unknown option: --no-as-needed
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:5414: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define _GNU_SOURCE 1
| #define _NETBSD_SOURCE 1
| #define __BSD_VISIBLE 1
| #define _DARWIN_C_SOURCE 1
| #define _PYTHONFRAMEWORK ""
| /* end confdefs.h. */
Things I have tried:
re-installing xcode command line tools
re-installing with brew (and arch brew -x86_64) pyenv pre-requisites: openssl, readling, sqlite3 etc.
different CFLAGS and LDFLAGS (I can't remember which but largely, pointing to x86 folders for openssl, zlib, readline, etc.)
I am still fairly new to using M1 Macs so any guidance would be much appreciated.
The solution was to
install gettext library with arch -x86_64 /usr/local/bin/brew install gettext
add path to gettext to pyenv CFLAGS and LDFLAGS in your .zshrc file. (Usually it's at ~/.zshrc)
export LDFLAGS="-L/usr/local/opt/gettext/lib"
export CPPFLAGS="-I/usr/local/opt/gettext/include"
restart terminal

espeak-ng cross compile make install issue

I am trying to cross compile espeak-ng for target=arm-linux-gnueabihf
The sudo make install step gives the following error :
~:~/Downloads/Dependencies/espeak-ng-master$ sudo make install
[sudo] password for abc:
ESPEAK_DATA_PATH=../Downloads/Dependencies/espeak-ng-master src/espeak-ng --compile-intonations && \
ESPEAK_DATA_PATH=../Downloads/Dependencies/espeak-ng-master src/espeak-ng --compile-phonemes && \
touch phsource/phonemes.stamp
src/espeak-ng: line 117: ../Downloads/Dependencies/espeak-ng-master/src/.libs/espeak-ng: cannot execute binary file: Exec format error
src/espeak-ng: line 117: ../Downloads/Dependencies/espeak-ng-master/src/.libs/espeak-ng: Success
Makefile:2590: recipe for target 'phsource/phonemes.stamp' failed
make: *** [phsource/phonemes.stamp] Error 126
I have cross compiled using the following :
./configure CC=arm-linux-gnueabihf-gcc -prefix /opt/myproject-sysroot/usr --build=$MACHTYPE --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
make -B src/speak-ng src/espeak-ng
Configure output
Configuration for eSpeak NG complete.
Source code location: .
C99 Compiler: arm-linux-gnueabihf-gcc
C99 Compiler flags: -Wunused-parameter -Wunused -Wuninitialized -Wreturn-type -Wmissing-prototypes -Wimplicit -g -O2 -std=c99
Sonic: no
PCAudioLib: no
gradle (Android): gradle
ndk-build (Android):
Klatt: yes
MBROLA: yes
Async: yes
Extended Dictionaries:
Russian: no
Chinese (Mandarin): no
Chinese (Cantonese): no
~/Downloads/Dependencies/ESPEAK/espeak-ng-master$ sudo make -B src/speak-ng src/espeak-ng
Output for make command:
---------------
-----------
CC src/libespeak-ng/src_libespeak_ng_la-tr_languages.lo
CC src/libespeak-ng/src_libespeak_ng_la-voices.lo
CC src/libespeak-ng/src_libespeak_ng_la-wavegen.lo
src/libespeak-ng/wavegen.c: In function ‘WavegenFill’:
src/libespeak-ng/wavegen.c:1400:17: warning: variable ‘p_start’ set but not used [-Wunused-but-set-variable]
unsigned char *p_start;
^~~~~~~
CC src/libespeak-ng/src_libespeak_ng_la-klatt.lo
CC src/libespeak-ng/src_libespeak_ng_la-mbrowrap.lo
CC src/libespeak-ng/src_libespeak_ng_la-espeak_command.lo
CC src/libespeak-ng/src_libespeak_ng_la-event.lo
CC src/libespeak-ng/src_libespeak_ng_la-fifo.lo
CCLD src/libespeak-ng.la
arm-linux-gnueabihf-ar: `u' modifier ignored since `D' is the default (see `U')
CCLD src/speak-ng
CC src/espeak-ng.o
src/espeak-ng.c: In function ‘main’:
src/espeak-ng.c:744:3: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(p_text, 1, filesize, f_text);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CCLD src/espeak-ng
Make install output
~/Downloads/Dependencies/ESPEAK/espeak-ng-master$ sudo make LIBDIR=/opt/myproject-sysroot/usr install
ESPEAK_DATA_PATH=../Downloads/Dependencies/ESPEAK/espeak-ng-master src/espeak-ng --compile-intonations && \
ESPEAK_DATA_PATH=../Downloads/Dependencies/ESPEAK/espeak-ng-master src/espeak-ng --compile-phonemes && \
touch phsource/phonemes.stamp
src/espeak-ng: line 117: ../Downloads/Dependencies/ESPEAK/espeak-ng-master/src/.libs/espeak-ng: cannot execute binary file: Exec format error
src/espeak-ng: line 117: ../Downloads/Dependencies/ESPEAK/espeak-ng-master/src/.libs/espeak-ng: Success
Makefile:2590: recipe for target 'phsource/phonemes.stamp' failed
make: *** [phsource/phonemes.stamp] Error 126

error: C preprocessor "/usr/local/bin/cpp" fails sanity check

I'm trying to install freetype 2.8, unfortunately I started getting this error everytime I run the configure file I run into this issue: error: C preprocessor "/usr/local/bin/cpp" fails sanity check
I tried some solutions I found on the site but they didn't solve my problem, maybe you can.
I'll paste here the configure.log file:
`
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = ubuntu
uname -m = x86_64
uname -r = 4.10.0-38-generic
uname -s = Linux
uname -v = #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /home/tabi/bin
PATH: /home/tabi/.local/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games
PATH: /usr/local/games
PATH: /snap/bin
configure:2934: $? = 0
configure:2923: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
configure:2934: $? = 0
configure:2923: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2934: $? = 1
configure:2923: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:2934: $? = 1
configure:2954: checking whether the C compiler works
configure:2976: gcc conftest.c >&5
configure:2980: $? = 0
configure:3028: result: yes
configure:3031: checking for C compiler default output file name
configure:3033: result: a.out
configure:3039: checking for suffix of executables
configure:3046: gcc -o conftest conftest.c >&5
configure:3050: $? = 0
configure:3072: result:
configure:3094: checking whether we are cross compiling
configure:3102: gcc -o conftest conftest.c >&5
configure:3106: $? = 0
configure:3113: ./conftest
configure:3117: $? = 0
configure:3132: result: no
configure:3137: checking for suffix of object files
configure:3159: gcc -c conftest.c >&5
configure:3163: $? = 0
configure:3184: result: o
configure:3188: checking whether we are using the GNU C compiler
configure:3207: gcc -c conftest.c >&5
configure:3207: $? = 0
configure:3216: result: yes
configure:3225: checking whether gcc accepts -g
configure:3245: gcc -c -g conftest.c >&5
configure:3245: $? = 0
configure:3286: result: yes
configure:3303: checking for gcc option to accept ISO C89
configure:3366: gcc -c -g -O2 conftest.c >&5
configure:3366: $? = 0
configure:3379: result: none needed
configure:3404: checking how to run the C preprocessor
configure:3474: result: /usr/local/bin/cpp
configure:3494: /usr/local/bin/cpp conftest.c
./configure: line 1609: /usr/local/bin/cpp: No such file or directory
configure:3494: $? = 127
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "FreeType"
| #define PACKAGE_TARNAME "freetype"
| #define PACKAGE_VERSION "2.8"
| #define PACKAGE_STRING "FreeType 2.8"
| #define PACKAGE_BUGREPORT "freetype#nongnu.org"
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3494: /usr/local/bin/cpp conftest.c
./configure: line 1609: /usr/local/bin/cpp: No such file or directory
configure:3494: $? = 127
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "FreeType"
| #define PACKAGE_TARNAME "freetype"
| #define PACKAGE_VERSION "2.8"
| #define PACKAGE_STRING "FreeType 2.8"
| #define PACKAGE_BUGREPORT "freetype#nongnu.org"
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits.h>
| #else
| # include <assert.h>
| #endif
| Syntax error
configure:3524: error: in `/home/tabi/Downloads/freetype-2.8/builds/unix':
configure:3526: error: C preprocessor "/usr/local/bin/cpp" fails sanity check
See `config.log' for more details
`

How to include a shared library (.so) or library in a R package?

1.I have a library fpmpi . I made the shared library fpmpi.so from this library.I am using ubuntu .
2.Now, I want to use in my R package .My R package has src folder the there is makevars.in file I
### Setup R source code and objects.
PKG_CPPFLAGS = #PKG_CPPFLAGS#
PKG_LIBS = -L/home/g/Desktop/Project -fpmpip
### For user configuration.
USER_CONF = Makeconf
### Start making here.
all: $(SHLIB)
#echo "MPIRUN = #MPIRUN#" > $(USER_CONF)
#echo "MPIEXEC = #MPIEXEC#" >> $(USER_CONF)
#echo "ORTERUN = #ORTERUN#" >> $(USER_CONF)
#echo "TMP_INC = #TMP_INC#" >> $(USER_CONF)
#echo "TMP_LIB = #TMP_LIB#" >> $(USER_CONF)
#echo "MPI_ROOT = #MPI_ROOT#" >> $(USER_CONF)
#echo "MPITYPE = #MPITYPE#" >> $(USER_CONF)
#echo "MPI_INCLUDE_PATH = #MPI_INCLUDE_PATH#" >> $(USER_CONF)
#echo "MPI_LIBPATH = #MPI_LIBPATH#" >> $(USER_CONF)
#echo "MPI_LIBS = #MPI_LIBS#" >> $(USER_CONF)
#echo "MPI_DEFS = #MPI_DEFS#" >> $(USER_CONF)
#echo "MPI_INCL2 = #MPI_INCL2#" >> $(USER_CONF)
#echo "PKG_CPPFLAGS = #PKG_CPPFLAGS#" >> $(USER_CONF)
#echo "PKG_LIBS = #PKG_LIBS#" >> $(USER_CONF)
$(SHLIB): $(OBJECTS)
clean:
#rm -rf *.o *.d *.rc *.so* *.dll *.dylib *.a *.lib \
Makedeps Makevars $(USER_CONF) $(SHLIB) $(OBJECTS)
where do i define the shared library path in it. And how would i verify it has been loaded.
The library is dynamic i have check using ldd fpmpi.so
I am using R CMD INSTALL package_name command to install package ?
The output of the R CMD INSTALL package_name is:
g#G:~/Documents/igauravsehrawat.github.io$ sudo R CMD INSTALL pbdMPI/
* installing to library ‘/home/g/R/x86_64-pc-linux-gnu-library/2.15’
* installing *source* package ‘pbdMPI’ ...
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking for mpirun... mpirun
checking for mpiexec... mpiexec
checking for orterun... orterun
checking for sed... /bin/sed
checking for mpicc... mpicc
checking for ompi_info... ompi_info
checking for mpich2version... mpich2version
found sed, mpicc, and ompi_info ...
gcc: error: unrecognized option '--showme:incdirs'
>> TMP_INC_DIRS =
gcc: error: unrecognized option '--showme:libdirs'
>> TMP_LIB_DIRS =
I am here /usr/lib/openmpi and it is OpenMPI
Trying to find mpi.h ...
Found in /usr/lib/openmpi/include
Trying to find libmpi.so or libmpich.a ...
Found libmpi in /usr/lib/openmpi/lib
checking for openpty in -lutil... yes
checking for main in -lpthread... yes
******************* Results of pbdMPI package configure *****************
>> TMP_INC = F
>> TMP_LIB = F
>> MPI_ROOT = /usr/lib/openmpi
>> MPITYPE = OPENMPI
>> MPI_INCLUDE_PATH = /usr/lib/openmpi/include
>> MPI_LIBPATH = /usr/lib/openmpi/lib
>> MPI_LIBS = -lutil -lpthread
>> MPI_DEFS = -DMPI2
>> MPI_INCL2 =
>> PKG_CPPFLAGS = -I/usr/lib/openmpi/include -DMPI2 -DOPENMPI
>> PKG_LIBS = -L/usr/lib/openmpi/lib -lmpi -lutil -lpthread
*************************************************************************
configure: creating ./config.status
config.status: creating src/Makevars
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating R/zzz.r
** libs
installing via 'install.libs.R' to /home/g/R/x86_64-pc-linux-gnu-library/2.15/pbdMPI
** R
** data
** moving datasets to lazyload DB
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
‘pbdMPI-guide.Rnw’
** testing if installed package can be loaded
* DONE (pbdMPI)
Thanks

Compiling wmii on Fedora 15 x86_64

I'm having trouble compiling wmii v3.9.2 on Fedora 15; Here's the interesting part (things break down at the linking stage):
% bmake -de
MAKE all libbio/
MAKE all libfmt/
MAKE all libregexp/
MAKE all libutf/
MAKE all libixp/
MAKE all doc/
MAKE all man/
MAKE all cmd/
MAKE all cmd/wmii/
MAKE all cmd/menu/
LD cmd/wmii9menu.out
/usr/bin/ld: wmii/xext.o: undefined reference to symbol 'XRenderFindVisualFormat'
/usr/bin/ld: note: 'XRenderFindVisualFormat' is defined in DSO /usr/lib64/libXrender.so.1 so try adding it to the linker command line
/usr/lib64/libXrender.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
*** Failed target: wmii9menu.out
*** Failed command: ../util/link "cc" "$(pkg-config --libs 2>/dev/null) -g -L../lib -L/usr/lib64 ../lib/libregexp9.a ../lib/libbio.a ../lib/libfmt.a ../lib/libutf.a -L../lib -L/usr/lib64 ../lib/libregexp9.a ../lib/libbio.a ../lib/libfmt.a ../lib/libutf.a" wmii9menu.out wmii9menu.o clientutil.o wmii/x11.o wmii/xext.o wmii/geom.o wmii/map.o util.o ../lib/libixp.a $(pkg-config --libs xft xrandr xinerama) -lXext
*** Error code 1
Stop.
bmake: stopped in /srv/redhat/BUILD/wmii+ixp-3.9.2/cmd
*** Failed target: dall
*** Failed command: dirs="libbio libfmt libregexp libutf libixp doc man cmd libwmii_hack rc alternative_wmiircs"; set -e; targ=dall; targ=${targ#d}; for i in $dirs; do export WMII_HGVERSION=""; export BASE=$i/; if [ ! -d $i ]; then echo Skipping nonexistent directory: $i 1>&2; else echo MAKE $targ $BASE; (cd $i && bmake $targ) || exit ; fi; done
*** Error code 1
Stop.
bmake: stopped in /srv/redhat/BUILD/wmii+ixp-3.9.2
Finally, in config.mk, I have the following settings:
...
INCLUDES = -I. -I$(ROOT)/include -I$(INCLUDE) -I/usr/include
LIBS = -L$(ROOT)/lib -L/usr/lib64
...
LDFLAGS += -g $(LIBS)
SOLDFLAGS += $(LDFLAGS)
SHARED = -shared -Wl,-soname=$(SONAME)
STATIC = -static
...
With a little more manual resolution, the statement generating the error is essentially as follows:
gcc \
-o wmii9menu.out\
-L../lib -L/usr/lib $(pkg-config --libs xft xrandr xinerama xext)\
../lib/libregexp9.a ../lib/libbio.a ../lib/libfmt.a\
../lib/libutf.a ../lib/libixp.a\
wmii9menu.o clientutil.o util.o\
wmii/x11.o wmii/xext.o wmii/geom.o wmii/map.o
Here, the pkg-config resolves to the following, which by itself is perfectly correct:
-lXft -lXrandr -lXinerama -lXext
And the solution is as follows:
--- wmii+ixp-3.9.2/config.mk 2011-06-03 14:03:22.950163074 +1000
+++ wmii+ixp-3.9.2/config.mk 2011-06-03 14:03:16.086129011 +1000
## -32 +32 ##
-X11PACKAGES = xft
+X11PACKAGES = xft xext xrandr xrender xinerama

Resources