Perl installtion on ARMv7eb - perl

I have cross compiled tool chain for armv7eb. Now I have copied the tools to my target machine and tried to build perl on target. In this process of building perl, there is a binary called 'miniperl' which crashes, outputting "ILLEGAL INSTRUCTION".
Can someone help me point out what I should be doing?
PERL VERSION: 5.8.8
GCC: 4.1.3
Please find the crash log below. Does anybody have any suggestions?
sh cflags "optimize='-O'" opmini.o` -DPIC -fPIC -DPERL_EXTERNAL_GLOB opmini.c
CCCMD = cc -DPERL_CORE -c -msoft-float -dynamic -fno-strict-aliasing -pipe -Wdeclaration-after-statement -O -Wall
LD_LIBRARY_PATH=/usr/pkg/src/perl-5.8.8:/lib:/usr/lib:/usr/pkg/lib:/usr/pkg/src/PTHREAD/lib cc -Wl,-rpath,/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/pkg/lib -L/lib -L/usr/lib -o miniperl miniperlmain.o opmini.o -L. -lperl -lm -lcrypt -lutil -lc -lposix
LD_LIBRARY_PATH=/usr/pkg/src/perl-5.8.8:/lib:/usr/lib:/usr/pkg/lpid 25563 (miniperl), uid 0: exited on signal 4 (core not dumped, err = 2)
ib:/usr/pkg/src/PTHREAD/lib ./miniperl -w -Ilib -MExporter -e '<?>' || make minitest
[1] Illegal instruction LD_LIBRARY_PATH=...
cp ext/re/re.pm lib/re.pm
LD_LIBRARY_PATH=/usr/pkg/src/perpid 8052 (miniperl), uid 0: exited on signal 4 (core not dumped, err = 2)
l-5.8.8:/lib:/usr/lib:/usr/pkg/lib:/usr/pkg/src/PTHREAD/lib ./miniperl -Ilib configpm --heavy=lib/Config_heavy.pl lib/Config.pm
[1] Illegal instruction LD_LIBRARY_PATH=...
*** Error code 132
Stop.
make: stopped in /upid 25595 (miniperl), uid 0: exited on signal 4 (core not dumped, err = 2)
sr/pkg/src/perl-5.8.8
*** Error code 1 (ignored)
You may see some irrelevant test failures if you have been unable
to build lib/Config.pm, lib/lib.pm or the Unicode data files.
cd t && (rm -f perl; /bin/ln -s ../miniperl perl) && LD_LIBRARY_PATH=/usr/pkg/src/perl-5.8.8:/lib:/usr/lib:/usr/pkg/lib:/usr/pkg/src/PTHREAD/lib ./perl TEST -minitest base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t uni/*.t </dev/tty
[1] Illegal instruction LD_LIBRARY_PATH=...
*** Error code 132 (ignored)
*** Error code 1 (ignored)
LD_LIBRARY_PATH=/usr/pkg/src/perpid 703 (miniperl), uid 0: exited on signal 4 (core not dumped, err = 2)
l-5.8.8:/lib:/usr/lib:/usr/pkg/lib:/usr/pkg/src/PTHREAD/lib ./miniperl -Ilib configpm --heavy=lib/Config_heavy.pl lib/Config.pm

Related

MATLAB mex linking error using clang and external library fftw3

My question is about linking errors I get when compiling with external libraries using mex. I'm trying to compile C++ code using the external library fftw3 using Matlab's mex on MacOS using clang++. Here is an example
main.cpp
#include "fftw3.h"
int main(){
double * test = (double *) fftw_malloc(10*sizeof(double));
}
compiling this works
$ clang++ main.cpp -L/usr/local/lib -lfftw3
Now I try something similar with mex
mex.cpp
#include "math.h"
#include "matrix.h"
#include "mex.h"
#include "fftw3.h"
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
double * test = (double *) fftw_malloc(10*sizeof(double));
}
in MATLAB
>> mex -setup C++;
>> mex -L/usr/local/lib -lfftw3 CXXFLAGS='-L/usr/local/lib -lfftw3' mex.cpp
Building with 'Xcode Clang++'.
Error using mex
clang: warning: -lfftw3: 'linker' input unused
clang: warning: argument unused during compilation: '-L/usr/local/lib'
/path/to/file/mex.cpp:4:10:
fatal error: 'fftw3.h' file not found
#include "fftw3.h"
^
1 error generated.
using the -v flag I get more detailed errors
Verbose mode is on.
Neither -compatibleArrayDims nor -largeArrayDims is selected.
Using -compatibleArrayDims. In the future, MATLAB will require the use of
-largeArrayDims and remove the -compatibleArrayDims option.
For more information:
http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.
... Looking for compiler 'Xcode Clang++' ...
... Looking for environment variable 'DEVELOPER_DIR' ...No.
... Executing command 'xcode-select -print-path' ...Yes ('/Applications/Xcode.app/Contents/Developer').
... Looking for folder '/Applications/Xcode.app/Contents/Developer' ...Yes.
... Executing command 'which xcrun' ...Yes ('/usr/bin/xcrun').
... Looking for folder '/usr/bin' ...Yes.
... Executing command 'defaults read com.apple.dt.Xcode IDEXcodeVersionForAgreedToGMLicense' ...No.
... Executing command 'defaults read /Library/Preferences/com.apple.dt.Xcode IDEXcodeVersionForAgreedToGMLicense' ...Yes ('7.1.1').
... Executing command '
agreed=7.1.1
if echo $agreed | grep -E '[\.\"]' >/dev/null; then
lhs=`expr "$agreed" : '\([0-9]*\)[\.].*'`
rhs=`expr "$agreed" : '[0-9]*[\.]\(.*\)$'`
if echo $rhs | grep -E '[\."]' >/dev/null; then
rhs=`expr "$rhs" : '\([0-9]*\)[\.].*'`
fi
if [ $lhs -gt 4 ] || ( [ $lhs -eq 4 ] && [ $rhs -ge 3 ] ); then
echo $agreed
else
exit 1
fi
fi' ...Yes ('7.1.1').
... Executing command 'xcode-select -print-path' ...Yes ('/Applications/Xcode.app/Contents/Developer').
... Looking for folder '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk' ...No.
... Looking for folder '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk' ...No.
... Looking for folder '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk' ...Yes.
... Executing command 'xcode-select -print-path' ...Yes ('/Applications/Xcode.app/Contents/Developer').
... Looking for folder '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk' ...No.
... Looking for folder '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk' ...No.
... Looking for folder '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk' ...Yes.
... Executing command 'echo /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk | rev | cut -c1-10 | rev | egrep -oh '[0-9]+\.[0-9]+'' ...Yes ('10.11').
Found installed compiler 'Xcode Clang++'.
Options file details
-------------------------------------------------------------------
Compiler location: /Applications/Xcode.app/Contents/Developer
Options file: ~/.matlab/R2014b/mex_C++_maci64.xml
CMDLINE100 : /usr/bin/xcrun -sdk macosx10.11 clang++ -c -DMX_COMPAT_32 -DMATLAB_MEX_FILE -I"/Applications/MATLAB_R2014b.app/extern/include" -I"/Applications/MATLAB_R2014b.app/simulink/include" -L/usr/local/lib -lfftw3 -O2 -DNDEBUG /path/to/file/mex.cpp -o /var/folders/09/dysbhb1d5zn98sq8lzkwpn5r0000gn/T//mex_291104578803706_45753/mex.o
CMDLINE200 : /usr/bin/xcrun -sdk macosx10.11 clang++ -Wl,-twolevel_namespace -undefined error -arch x86_64 -mmacosx-version-min=10.11 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -framework Cocoa -bundle -Wl,-exported_symbols_list,"/Applications/MATLAB_R2014b.app/extern/lib/maci64/mexFunction.map" -O -Wl,-exported_symbols_list,"/Applications/MATLAB_R2014b.app/extern/lib/maci64/mexFunction.map" /var/folders/09/dysbhb1d5zn98sq8lzkwpn5r0000gn/T//mex_291104578803706_45753/mex.o -lfftw3 -L/usr/local/lib -L"/Applications/MATLAB_R2014b.app/bin/maci64" -lmx -lmex -lmat -o mex.mexmaci64
CMDLINE300 : rm -f /var/folders/09/dysbhb1d5zn98sq8lzkwpn5r0000gn/T//mex_291104578803706_45753/mex.o
CXX : /usr/bin/xcrun -sdk macosx10.11 clang++
DEFINES : -DMX_COMPAT_32 -DMATLAB_MEX_FILE
MATLABMEX : -DMATLAB_MEX_FILE
CXXFLAGS : -L/usr/local/lib -lfftw3
INCLUDE : -I"/Applications/MATLAB_R2014b.app/extern/include" -I"/Applications/MATLAB_R2014b.app/simulink/include"
CXXOPTIMFLAGS : -O2 -DNDEBUG
CXXDEBUGFLAGS : -g
LDXX : /usr/bin/xcrun -sdk macosx10.11 clang++
LDFLAGS : -Wl,-twolevel_namespace -undefined error -arch x86_64 -mmacosx-version-min=10.11 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -framework Cocoa -bundle -Wl,-exported_symbols_list,"/Applications/MATLAB_R2014b.app/extern/lib/maci64/mexFunction.map"
LDBUNDLE : -bundle
LINKEXPORT : -Wl,-exported_symbols_list,"/Applications/MATLAB_R2014b.app/extern/lib/maci64/mexFunction.map"
LINKLIBS : -lfftw3 -L/usr/local/lib -L"/Applications/MATLAB_R2014b.app/bin/maci64" -lmx -lmex -lmat
LDOPTIMFLAGS : -O
LDDEBUGFLAGS : -g
OBJEXT : .o
LDEXT : .mexmaci64
DEVELOPER_DIR_CHECK :
XCODE_DIR : /Applications/Xcode.app/Contents/Developer
XCRUN_DIR : /usr/bin
XCODE_AGREED_VERSION : 7.1.1
ISYSROOT : /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
SDKVER : 10.11
MATLABROOT : /Applications/MATLAB_R2014b.app
ARCH : maci64
SRC : /path/to/file/mex.cpp
OBJ : /var/folders/09/dysbhb1d5zn98sq8lzkwpn5r0000gn/T//mex_291104578803706_45753/mex.o
OBJS : /var/folders/09/dysbhb1d5zn98sq8lzkwpn5r0000gn/T//mex_291104578803706_45753/mex.o
SRCROOT : /path/to/file/mex
DEF : /var/folders/09/dysbhb1d5zn98sq8lzkwpn5r0000gn/T//mex_291104578803706_45753/mex.def
EXP : mex.exp
LIB : mex.lib
EXE : mex.mexmaci64
ILK : mex.ilk
MANIFEST : mex.mexmaci64.manifest
TEMPNAME : mex
EXEDIR :
EXENAME : mex
OPTIM : -O2 -DNDEBUG
LINKOPTIM : -O
-------------------------------------------------------------------
Building with 'Xcode Clang++'.
/usr/bin/xcrun -sdk macosx10.11 clang++ -c -DMX_COMPAT_32 -DMATLAB_MEX_FILE -I"/Applications/MATLAB_R2014b.app/extern/include" -I"/Applications/MATLAB_R2014b.app/simulink/include" -L/usr/local/lib -lfftw3 -O2 -DNDEBUG /path/to/file/mex.cpp -o /var/folders/09/dysbhb1d5zn98sq8lzkwpn5r0000gn/T//mex_291104578803706_45753/mex.o
Error using mex
clang: warning: -lfftw3: 'linker' input unused
clang: warning: argument unused during compilation: '-L/usr/local/lib'
/path/to/file/mex.cpp:4:10:
fatal error: 'fftw3.h' file not found
#include "fftw3.h"
^
1 error generated.
The warnings
clang: warning: -lfftw3: 'linker' input unused
clang: warning: argument unused during compilation: '-L/usr/local/lib'
are there because you are setting CXXFLAGS to contain these flags. This variable is for compiler flags, but -L and -l are linker flags. Simply remove the CXXFLAGS definition from your mex command.
The error
/path/to/file/mex.cpp:4:10:
fatal error: 'fftw3.h' file not found
#include "fftw3.h"
^
1 error generated.
is because the compiler cannot find the fftw4.h header file. You need to tell the compiler where to find it:
mex -I/usr/local/include -L/usr/local/lib -lfftw3 mex.cpp
Note that in your first case, where you call clang++ directly, it is likely that CLang is configured to look for header files in /usr/local/include, it's a standard place. But when mex invokes your compiler (I don't even know if it's the same one?) apparently this location is not added to the search path.

not able to build mod_tile on openSUSE

i tried to build the mod_tile as in the link
then i was getting the same error
and tried came got the fix from this forum
i exported these
export CXXFLAGS="$(mapnik-config --cflags)"
export LDFLAGS="$(mapnik-config --ldflags)"
adding #include at the top of src/gen_tile.cpp
and changed the Makefile with --std=gnu++11
and i'm new to the linux and the cpp
Making all in iniparser3.0b
make[1]: Entering directory `/root/src/mod_tile/iniparser3.0b'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/src/mod_tile/iniparser3.0b'
make[1]: Entering directory `/root/src/mod_tile'
depbase=`echo src/gen_tile.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I. -I./includes -I/usr/include/freetype2 -I/usr/local/include -I/usr/local/include/mapnik/agg -I/opt/PostgreSQL/9.3/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng12 -I/usr/include -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng12 -DSYSTEM_LIBINIPARSER=0 -I/usr/local/include -I/usr/local/include/mapnik/agg -I/opt/PostgreSQL/9.3/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng12 -DSHAPE_MEMORY_MAPPED_FILE -DBIGINT -DBOOST_REGEX_HAS_ICU -DHAVE_JPEG -DMAPNIK_USE_PROJ4 -DHAVE_PNG -DHAVE_TIFF -DLINUX -DMAPNIK_THREADSAFE -DBOOST_SPIRIT_NO_PREDEFINED_TERMINALS=1 -DBOOST_PHOENIX_NO_PREDEFINED_TERMINALS=1 -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DNDEBUG -DHAVE_CAIRO -DGRID_RENDERER -DHAVE_LIBXML2 -std=c++11 -Wall -Wsign-compare -pthread -ftemplate-depth-300 -Wno-pragmas -O3 -MT src/gen_tile.o -MD -MP -MF $depbase.Tpo -c -o src/gen_tile.o src/gen_tile.cpp &&\
mv -f $depbase.Tpo $depbase.Po
src/gen_tile.cpp: In function ‘void parameterize_map_max_connections(mapnik::Map&, int)’:
src/gen_tile.cpp:180:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < m.layer_count(); i++) {
^
src/gen_tile.cpp:181:22: error: ‘class mapnik::Map’ has no member named ‘getLayer’
layer& l = m.getLayer(i);
^
src/gen_tile.cpp:182:43: error: invalid use of incomplete type ‘class mapnik::datasource’
parameters params = l.datasource()->params();
^
In file included from src/gen_tile.cpp:1:0:
/usr/local/include/mapnik/layer.hpp:37:7: error: forward declaration of ‘class mapnik::datasource’
class datasource;
^
src/gen_tile.cpp:188:9: error: ‘shared_ptr’ is not a member of ‘boost’
boost::shared_ptr<datasource> ds = datasource_cache::instance().create(params);
^
src/gen_tile.cpp:188:9: note: suggested alternative:
In file included from /usr/include/c++/4.8/bits/shared_ptr.h:52:0,
from /usr/include/c++/4.8/memory:82,
from /usr/local/include/mapnik/layer.hpp:32,
from src/gen_tile.cpp:1:
/usr/include/c++/4.8/bits/shared_ptr_base.h:261:11: note: ‘std::shared_ptr’
class shared_ptr;
^
src/gen_tile.cpp:188:37: error: expected primary-expression before ‘>’ token
boost::shared_ptr<datasource> ds = datasource_cache::instance().create(params);
^
src/gen_tile.cpp:188:39: error: ‘ds’ was not declared in this scope
boost::shared_ptr<datasource> ds = datasource_cache::instance().create(params);
^
src/gen_tile.cpp: In function ‘protoCmd render(xmlmapconfig*, int, int, int, char*, metaTile&)’:
src/gen_tile.cpp:259:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (yy = 0; yy < render_size_ty; yy++) {
^
src/gen_tile.cpp:260:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (xx = 0; xx < render_size_tx; xx++) {
^
make[1]: *** [src/gen_tile.o] Error 1
make[1]: Leaving directory `/root/src/mod_tile'
make: *** [all-recursive] Error 1
Please let me know anything i did wrong in the flow?
i am using this code
https://github.com/springmeyer/mod_tile
to build mod_tile now its working fine.

Compiling libmemcached-1.0.18 on Solaris 11, undefined symbols while linking clients/memcapable

While calling make on libmemcached-1.0.18 I got these messages and the compilation stop
...
CXX libmemcached/libmemcachedinternal_libmemcachedutilinternal_la-backtrace.lo
CXX libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-flush.lo
CXX libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pid.lo
CXX libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-ping.lo
CXX libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-pool.lo
CXX libmemcachedutil/libmemcachedinternal_libmemcachedutilinternal_la-version.lo
CXXLD libmemcachedinternal/libmemcachedutilinternal.la
CXX clients/clients_memcapable-memcapable.o
CXX libmemcached/clients_memcapable-byteorder.o
CXXLD clients/memcapable
Undefined first referenced
symbol in file
recv clients/clients_memcapable-memcapable.o
send clients/clients_memcapable-memcapable.o
__xnet_connect clients/clients_memcapable-memcapable.o
__xnet_socket clients/clients_memcapable-memcapable.o
__xnet_getsockopt libmemcached/.libs/libmemcached.a(lt1-libmemcached_libmemcached_la-behavior.o)
getsockname libmemcached/.libs/libmemcached.a(libmemcached_libmemcached_la-server.o)
setsockopt libmemcached/.libs/libmemcached.a(libmemcached_libmemcached_la-connect.o)
getaddrinfo clients/clients_memcapable-memcapable.o
freeaddrinfo clients/clients_memcapable-memcapable.o
gai_strerror clients/clients_memcapable-memcapable.o
__xnet_sendmsg libmemcached/.libs/libmemcached.a(libmemcached_libmemcached_la-do.o)
shutdown libmemcached/.libs/libmemcached.a(libmemcached_libmemcached_la-io.o)
ld: fatal: symbol referencing errors. No output written to clients/memcapable
collect2: ld returned 1 exit status
make[1]: *** [clients/memcapable] Error 1
make[1]: Leaving directory `/home/admin/libmemcached-1.0.18'
make: *** [all] Error 2
This is the ./configure summary
Configuration summary for libmemcached version 1.0.18
* Installation prefix: /usr/local
* System type: pc-solaris2.11
* Host CPU: i386
* C Compiler: gcc (GCC) 4.5.2
* C Flags: -g -O2 -Wno-unknown-pragmas -Wno-pragmas -Wall -Wextra -Wunsuffixed-float-constants -Wjump-misses-init -Wno-attributes -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wformat-y2k -Wlogical-op -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wnormalized=id -Woverride-init -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wsign-compare -Wstrict-overflow=1 -Wswitch-enum -Wundef -Wunsafe-loop-optimizations -funsafe-loop-optimizations -Wclobbered -Wunused -Wunused-result -Wunused-variable -Wunused-parameter -Wwrite-strings -fwrapv -pipe -fPIE -pie -Wpacked
* C++ Compiler: g++ (GCC) 4.5.2
* C++ Flags: -g -O2 -Wno-unknown-pragmas -Wno-pragmas -Wall -Wextra -Wno-attributes -Waddress -Warray-bounds -Wchar-subscripts -Wcomment -Wctor-dtor-privacy -Wfloat-equal -Wformat=2 -Wformat-y2k -Wmissing-field-initializers -Wlogical-op -Wnon-virtual-dtor -Wnormalized=id -Woverloaded-virtual -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wstrict-overflow=1 -Wswitch-enum -Wundef -Wunsafe-loop-optimizations -funsafe-loop-optimizations -Wclobbered -Wunused -Wunused-result -Wunused-variable -Wunused-parameter -Wwrite-strings -Wformat-security -fwrapv -pipe -fPIE -pie -Wpacked
* CPP Flags: -fvisibility=hidden
* LIB Flags:
* Assertions enabled: no
* Debug enabled: no
* Shared: yes
* Warnings as failure: no
* SASL support: no
* make -j: 2
* VCS checkout: no
I'm new to Unix/Linux and not sure what it this mean and where should I start looking.
You appear to be missing linking in the networking libraries. Add '-lnsl -lsocket' to your LIB flags.

Doxygen build failing with undefined reference to `libiconv_close', `libiconv', `libiconv_open'

I'm unable to build Doxygen on x86_64-linux.
I have Doxygen-1.8.6 unpacked.
I have libiconv-1.14 unpacked, built, installed.
I keep getting:
g++ -c -pipe -fsigned-char -D_LARGEFILE_SOURCE -Wall -W -O2 -I../qtools -I../libmd5 -I. -o ../objects/main.o main.cpp
g++ -o ../bin/doxygen ../objects/main.o -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread
../lib/libdoxycfg.a(portable_c.o): In function `portable_iconv_close':
portable_c.c:(.text+0x1): undefined reference to `libiconv_close'
../lib/libdoxycfg.a(portable_c.o): In function `portable_iconv':
portable_c.c:(.text+0x11): undefined reference to `libiconv'
../lib/libdoxycfg.a(portable_c.o): In function `portable_iconv_open':
portable_c.c:(.text+0x21): undefined reference to `libiconv_open'
collect2: ld returned 1 exit status
Which iconv gives:
/usr/local/bin/iconv
as expected.
Any ideas?
add -liconv to the end of the line in src/doxygen.pro.in:
unix:LIBS += -L../lib -ldoxygen -lvhdlparser -ldoxycfg -lqtools -lmd5 -lpthread %%SQLITE3_LIBS%% %%LIBCLANG_LIBS%% -liconv

Compiling DBD::mysql on SunOS 5.10

everybody
I apologize for the massive length of this post.
I am having some issues compiling DBD::mysql on SunOS.
# /usr/perl5/bin/perlgcc Makefile.PL
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/sfw/include/mysql -xstrconst -mt
embedded (mysql_config) =
ldflags (mysql_config) = -R/usr/sfw/lib -R/usr/sfw/lib/mysql
libs (mysql_config) = -L/usr/sfw/lib -L/usr/sfw/lib/mysql -lmysqlclient -lz -lposix4 -lcrypt -lgen -lsocket -lnsl -lm
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testsocket (default ) =
testuser (guessed ) =
Checking if your kit is complete...
Looks good
Using DBI 1.58 (for perl 5.008004 on sun4-solaris-64int) installed in /usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int/auto/DBI/
Writing Makefile for DBD::mysql
# /usr/sfw/bin/gmake
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
gcc -c -I/usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int/auto/DBI -I/usr/sfw/include/mysql -xstrconst -mt -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO -O2 -fno-strict-aliasing -DVERSION=\"4.022\" -DXS_VERSION=\"4.022\" -fPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE" dbdimp.c
gcc: language strconst not recognized
gcc: dbdimp.c: linker input file unused because linking not done
/usr/perl5/5.8.4/bin/perl -p -e "s/~DRIVER~/mysql/g" /usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int/auto/DBI/Driver.xst > mysql.xsi
/usr/perl5/5.8.4/bin/perl /usr/perl5/5.8.4/lib/ExtUtils/xsubpp -typemap /usr/perl5/5.8.4/lib/ExtUtils/typemap mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
Warning: duplicate function definition 'do' detected in mysql.xs, line 242
Warning: duplicate function definition 'rows' detected in mysql.xs, line 752
gcc -c -I/usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int/auto/DBI -I/usr/sfw/include/mysql -xstrconst -mt -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO -O2 -fno-strict-aliasing -DVERSION=\"4.022\" -DXS_VERSION=\"4.022\" -fPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE" mysql.c
gcc: language strconst not recognized
gcc: mysql.c: linker input file unused because linking not done
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.so
LD_RUN_PATH="/usr/sfw/lib:/usr/lib:/lib" /usr/perl5/5.8.4/bin/perl myld gcc -G dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so -L/usr/sfw/lib -L/usr/sfw/lib/mysql -lmysqlclient -lz -lposix4 -lcrypt -lgen -lsocket -lnsl -lm
gcc: dbdimp.o: No such file or directory
gcc: mysql.o: No such file or directory
gmake: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1
Probably relevant information:
mysql_config --cflags
-I/usr/sfw/include/mysql -xstrconst -mt
mysql_config --libs
-R/usr/sfw/lib -R/usr/sfw/lib/mysql -L/usr/sfw/lib -L/usr/sfw/lib/mysql -lmysqlclient -lz -lposix4 -lcrypt -lgen -lsocket -lnsl -lm
file `which perl`
/usr/bin/perl: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped
# perl --version
This is perl, v5.8.4 built for sun4-solaris-64int
ldd /usr/sfw/bin/mysql
libcurses.so.1 => /lib/libcurses.so.1
libmysqlclient.so.12 => /usr/sfw/lib/libmysqlclient.so.12
libz.so.1 => /usr/lib/libz.so.1
librt.so.1 => /lib/librt.so.1
libcrypt_i.so.1 => /usr/lib/libcrypt_i.so.1
libgen.so.1 => /lib/libgen.so.1
libsocket.so.1 => /lib/libsocket.so.1
libnsl.so.1 => /lib/libnsl.so.1
libm.so.2 => /lib/libm.so.2
libCstd.so.1 => /usr/lib/libCstd.so.1
libCrun.so.1 => /usr/lib/libCrun.so.1
libw.so.1 => /lib/libw.so.1
libthread.so.1 => /lib/libthread.so.1
libc.so.1 => /lib/libc.so.1
libaio.so.1 => /lib/libaio.so.1
libmd.so.1 => /lib/libmd.so.1
libmp.so.2 => /lib/libmp.so.2
libscf.so.1 => /lib/libscf.so.1
libdoor.so.1 => /lib/libdoor.so.1
libuutil.so.1 => /lib/libuutil.so.1
/usr/lib/cpu/sparcv8plus/libCstd_isa.so.1
/platform/SUNW,SPARC-Enterprise-T5120/lib/libc_psr.so.1
/platform/SUNW,SPARC-Enterprise-T5120/lib/libmd_psr.so.1
# perl -V
Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
Platform:
osname=solaris, osvers=2.10, archname=sun4-solaris-64int
uname='sunos localhost 5.10 sun4u sparc SUNW,Ultra-2'
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO',
optimize='-xO3 -xspace -xildoff',
cppflags=''
ccversion='Sun WorkShop', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =''
libpth=/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc
perllibs=-lsocket -lnsl -ldl -lm -lc
libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R /usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE'
cccdlflags='-KPIC', lddlflags='-G'
Characteristics of this binary (from libperl):
Compile-time options: USE_64_BIT_INT USE_LARGE_FILES
Locally applied patches:
22667 The optree builder was looping when constructing the ops ...
22715 Upgrade to FileCache 1.04
22733 Missing copyright in the README.
22746 fix a coredump caused by rv2gv not fully converting a PV ...
22755 Fix 29149 - another UTF8 cache bug hit by substr.
22774 [perl #28938] split could leave an array without ...
22775 [perl #29127] scalar delete of empty slice returned garbage
22776 [perl #28986] perl -e "open m" crashes Perl
22777 add test for change #22776 ("open m" crashes Perl)
22778 add test for change #22746 ([perl #29102] Crash on assign ...
22781 [perl #29340] Bizarre copy of ARRAY make sure a pad op's ...
22796 [perl #29346] Double warning for int(undef) and abs(undef) ...
22818 BOM-marked and (BOMless) UTF-16 scripts not working
22823 [perl #29581] glob() misses a lot of matches
22827 Smoke [5.9.2] 22818 FAIL(F) MSWin32 WinXP/.Net SP1 (x86/1 cpu)
22830 [perl #29637] Thread creation time is hypersensitive
22831 improve hashing algorithm for ptr tables in perl_clone: ...
22839 [perl #29790] Optimization busted: '#a = "b", sort #a' ...
22850 [PATCH] 'perl -v' fails if local_patches contains code snippets
22852 TEST needs to ignore SCM files
22886 Pod::Find should ignore SCM files and dirs
22888 Remove redundant %SIG assignments from FileCache
23006 [perl #30509] use encoding and "eq" cause memory leak
23074 Segfault using HTML::Entities
23106 Numeric comparison operators mustn't compare addresses of ...
23320 [perl #30066] Memory leak in nested shared data structures ...
23321 [perl #31459] Bug in read()
27722 perlio.c breaks on Solaris/gcc when > 256 FDs are available
SPRINTF0 - fixes for sprintf formatting issues - CVE-2005-3962
6663288 Upgrade to CGI.pm 3.33
REGEXP0 - fix for UTF-8 recoding in regexps - CVE-2007-5116
6758953 Perl Sys::Syslog can log messages with wrong severity
Built under solaris
Compiled at May 21 2009 03:59:02
#INC:
/usr/perl5/5.8.4/lib/sun4-solaris-64int
/usr/perl5/5.8.4/lib
/usr/perl5/site_perl/5.8.4/sun4-solaris-64int
/usr/perl5/site_perl/5.8.4
/usr/perl5/site_perl
/usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int
/usr/perl5/vendor_perl/5.8.4
/usr/perl5/vendor_perl
.
isainfo -v
64-bit sparcv9 applications
asi_blk_init vis2 vis
32-bit sparc applications
asi_blk_init vis2 vis v8plus div32 mul32
Any tips as how I should proceed, if possible in a step-by-step (for dummies) manner?
Thanks!
Try using a Sun compiler, which presumably compiled your mysql. Others have had this problem, too.