I have a legacy Perl 5.8.9 project which I need to run in a docker environment. Since I new it worked on Ubuntu I tried compiling it on an Ubuntu 16.1 and
FROM ubuntu
RUN apt-get update \
&& apt-get install -y curl \
&& apt-get install -y wget \
&& apt-get install -y perlbrew
NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
Images
since I couldn't find the version on perlbrew, I tried compiling from perl-5.8.9.tar.bz2 which I downloaded
Compilation failed having something to do with miniperl.
perlio.c:515:2: note: in expansion of macro 'PerlLIO_write'
PerlLIO_write(dbg, s, len);
^~~~~~~~~~~~~
perlio.c: In function 'PerlIO_parse_layers':
perlio.c:995:11: warning: this statement may fall through [-Wimplicit-
fallthrough=]
if (*e++) {
^
perlio.c:1001:4: note: here
case '\0':
^~~~
In file included from perl.h:3169:0,
from perlio.c:57:
perlio.c: In function 'S_more_refcounted_fds':
iperlsys.h:762:39: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
#define PerlLIO_write(fd, buf, count) write((fd), (buf), (count))
^~~~~~~~~~~~~~~~~~~~~~~~~~~
perlio.c:2307:2: note: in expansion of macro 'PerlLIO_write'
PerlLIO_write(PerlIO_fileno(Perl_error_log),
^~~~~~~~~~~~~
`sh cflags "optimize='-O2'" perlapi.o` perlapi.c
CCCMD = cc -DPERL_CORE -c -fno-strict-aliasing -pipe - I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c89 - O2 -Wall -ansi -pedantic -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat -DPERL_GCC_PEDANTIC
`sh cflags "optimize='-O2'" numeric.o` numeric.c
CCCMD = cc -DPERL_CORE -c -fno-strict-aliasing -pipe - I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c89 - O2 -Wall -ansi -pedantic -W -Wextra -Wdeclaration-after-statement -Wendif- labels -Wc++-compat -DPERL_GCC_PEDANTIC
`sh cflags "optimize='-O2'" mathoms.o` mathoms.c
CCCMD = cc -DPERL_CORE -c -fno-strict-aliasing -pipe - I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c89 - O2 -Wall -ansi -pedantic -W -Wextra -Wdeclaration-after-statement -Wendif- labels -Wc++-compat -DPERL_GCC_PEDANTIC
`sh cflags "optimize='-O2'" locale.o` locale.c
CCCMD = cc -DPERL_CORE -c -fno-strict-aliasing -pipe - I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c89 - O2 -Wall -ansi -pedantic -W -Wextra -Wdeclaration-after-statement -Wendif- labels -Wc++-compat -DPERL_GCC_PEDANTIC
`sh cflags "optimize='-O2'" pp_pack.o` pp_pack.c
CCCMD = cc -DPERL_CORE -c -fno-strict-aliasing -pipe - I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c89 - O2 -Wall -ansi -pedantic -W -Wextra -Wdeclaration-after-statement -Wendif- labels -Wc++-compat -DPERL_GCC_PEDANTIC
pp_pack.c: In function 'S_pack_rec':
pp_pack.c:2716:7: warning: variable 'was_utf8' set but not used [- Wunused-but-set-variable]
U32 was_utf8;
^~~~~~~~
`sh cflags "optimize='-O2'" pp_sort.o` pp_sort.c
CCCMD = cc -DPERL_CORE -c -fno-strict-aliasing -pipe - I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c89 - O2 -Wall -ansi -pedantic -W -Wextra -Wdeclaration-after-statement -Wendif- labels -Wc++-compat -DPERL_GCC_PEDANTIC
`sh cflags "optimize='-O2'" opmini.o` -DPERL_EXTERNAL_GLOB opmini.c
CCCMD = cc -DPERL_CORE -c -fno-strict-aliasing -pipe -vI/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -std=c89 - O2 -Wall -ansi -pedantic -W -Wextra -Wdeclaration-after-statement -Wendif- labels -Wc++-compat -DPERL_GCC_PEDANTIC
opmini.c: In function 'Perl_list':
opmini.c:977:5: warning: this statement may fall through [-Wimplicit- fallthrough=]
if (!o->op_next && cUNOPo->op_first->op_type == OP_FLOP) {
^
opmini.c:981:5: note: here
case OP_LIST:
^~~~
opmini.c: In function 'Perl_mod':
opmini.c:1277:11: warning: this statement may fall through [-Wimplicit-v
fallthrough=]
PL_hints |= HINT_BLOCK_SCOPE;
opmini.c:1278:5: note: here
case OP_SASSIGN:
^~~~
opmini.c: In function 'Perl_fold_constants':
opmini.c:2119:40: warning: argument 'o' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
Perl_fold_constants(pTHX_ register OP *o)
^
cc -L/usr/local/lib -o miniperl \
`echo gv.o toke.o perly.o op.o pad.o regcomp.o dump.o util.o mg.o reentr.o hv.o av.o perl.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o | sed 's/ op.o / /'` \
miniperlmain.o opmini.o
pp.o: In function `Perl_pp_pow':
pp.c:(.text+0x2d84): undefined reference to `pow'
pp.o: In function `Perl_pp_modulo':
pp.c:(.text+0x3b80): undefined reference to `fmod'
pp.o: In function `Perl_pp_atan2':
pp.c:(.text+0x8884): undefined reference to `atan2'
pp.o: In function `Perl_pp_sin':
pp.c:(.text+0x8978): undefined reference to `sqrt'
pp.c:(.text+0x8a23): undefined reference to `log'
pp.c:(.text+0x8a4e): undefined reference to `cos'
pp.c:(.text+0x8afb): undefined reference to `sin'
pp.c:(.text+0x8b13): undefined reference to `exp'
collect2: error: ld returned 1 exit status
makefile:313: recipe for target 'miniperl' failed
make: *** [miniperl] Error 1
Is there a ready docker image?
If not how do I install on ubuntu or preferably on alpine or another light container.
Run the following commands in the terminal one after another.
sudo apt-get install perlbrew
perlbrew available
perlbrew install perl-5.8.9
If it fails to download, create a directory as shown below
mkdir -p perl5/perlbrew/dists
Try again the following command
perlbrew install perl-5.8.9
For more info , please refer this:
https://askubuntu.com/questions/425427/how-to-install-perl-php-mysql-and-ruby-packages-on-ubuntu
In case you don't want to use perlbrew, here is another way-
From https://stackoverflow.com/a/44441545/2001559
In your docker file -
RUN apt-get install -y gcc
ADD http://www.cpan.org/src/5.0/perl-5.8.9.tar.gz /shared
RUN tar -xzf perl-5.8.9.tar.gz
WORKDIR /shared/perl-5.8.9
RUN ./Configure -des -Dprefix=/opt/perl-5.8.9/localperl
RUN make
RUN make test
RUN make install
perl-5.8.0
I solved the issue when created 2 directories:
mkdir -p /home/<username>/perl5/perlbrew/dists/
mkdir -p /home/<username>/perl5/perlbrew/build/perl-5.8.0
Gave rwx-rwx-rwx (to avoid any problems with the access):
chmod -Rf 0777 /home/<username>/perl5/perlbrew/dists
chmod -Rf 0777 /home/<username>/perl5/perlbrew/build/perl-5.8.0
Related
I made a module using Inline::C and I noticed some unexpected performance discrepancies between running it on the host MacOS vs a guest Linux VM. Looking into it, it was due to the default C compiler flags being different.
On MacOS they appear to be:
-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -O3 -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\"
Vs on Centos 7:
-fPIC -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\"
The main difference for my code is O3 vs O2, so I looked into the Inline docs and used:
use Inline (C => Config => ccflags => '-O3');
To explicitly specify -O3. Well, the result is that -O3 -O2 is applied that way, so specifying ccflags does not overwrite the default, it just adds before them, which in the end does not have any effect.
Any idea where the default comes from and/or how to overwrite it to specify the optimization level that I want.
It appears as though adding the optimize configuration option may do what you want. Here's a very short example with the output before adding optimize => '-O3' and after:
use warnings;
use strict;
use Inline 'C';
use Inline C => 'Config',
build_noisy => 1,
force_build => 1,
optimize => '-O3',
;
print add(5, 6);
__END__
__C__
int add (int x, int y){
return(x + y);
}
Here's the output (snipped for brevity):
Before:
cc -c -I"/home/steve/scratch/inline" -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2
After:
cc -c -I"/home/steve/scratch/inline" -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3
...on Linux Mint 18.3.
The default comes from $Config{optimize}, which is stored as a read-only default at the time perl was compiled/built on the system.
So I have been trying to compile this code using mex to on avail. The issue is it can not seem to find lstdc++ and lpthread and libm are for whatever reason incompatible. My /usr/lib32 folder looks like the following:
iggy#ThinkpadX1:~/Applications/Matlab_2012a/bin$ ls /usr/lib32/
crt1.o libanl.so libc_nonshared.a libg.a libmcheck.a libnss_files.so libpthread.so librt.so libz.so.1
crti.o libBrokenLocale.a libcrypt.a libgcc_s.so.1 libm.so libnss_hesiod.so libquadmath.so.0 libstdc++.so.6 libz.so.1.2.3.4
crtn.o libBrokenLocale.so libcrypt.so libgomp.so.1 libnsl.a libnss_nisplus.so libquadmath.so.0.0.0 libstdc++.so.6.0.16 Mcrt1.o
gconv libbsd-compat.a libc.so libgomp.so.1.0.0 libnsl.so libnss_nis.so libresolv.a libthread_db.so Scrt1.o
gcrt1.o libc.a libdl.a libieee.a libnss_compat.so libpthread.a libresolv.so libutil.a
libanl.a libcidn.so libdl.so libm.a libnss_dns.so libpthread_nonshared.a librt.a libutil.so
And the errors I am recieving are the following:
K>> make_csolve
**************************************************************************
Warning: 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, see:
http://www.mathworks.com/help/techdoc/matlab_external/bsflnue-1.html
**************************************************************************
/home/iggy/Applications/Matlab_2012a/bin/mex: 1: /home/iggy/Applications/Matlab_2012a/bin/util/oscheck.sh: /lib64/libc.so.6: not found
/home/iggy/Applications/Matlab_2012a/bin/mex: 1: /home/iggy/Applications/Matlab_2012a/bin/util/oscheck.sh: /lib64/libc.so.6: not found
-> mexopts.sh sourced from directory (DIR = $MATLAB/bin)
FILE = /home/iggy/Applications/Matlab_2012a/bin/mexopts.sh
----------------------------------------------------------------
-> MATLAB = /home/iggy/Applications/Matlab_2012a
-> CC = gcc-4.4
-> CC flags:
CFLAGS = -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread
CDEBUGFLAGS = -g
COPTIMFLAGS = -O -DNDEBUG
CLIBS = -Wl,-rpath-link,/home/iggy/Applications/Matlab_2012a/bin/glnxa64 -L/usr/lib32 -L/home/iggy/Applications/Matlab_2012a/bin/glnxa64 -lmx -lmex -lmat -lm -lstdc++
arguments = -DMX_COMPAT_32
-> CXX = g++-4.4
-> CXX flags:
CXXFLAGS = -ansi -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread
CXXDEBUGFLAGS = -g
CXXOPTIMFLAGS = -O -DNDEBUG
CXXLIBS = -Wl,-rpath-link,/home/iggy/Applications/Matlab_2012a/bin/glnxa64 -L/home/iggy/Applications/Matlab_2012a/bin/glnxa64 -lmx -lmex -lmat -lm
arguments = -DMX_COMPAT_32
-> FC = gfortran
-> FC flags:
FFLAGS = -fexceptions -fbackslash -fPIC -fno-omit-frame-pointer
FDEBUGFLAGS = -g
FOPTIMFLAGS = -O
FLIBS = -Wl,-rpath-link,/home/iggy/Applications/Matlab_2012a/bin/glnxa64 -L/home/iggy/Applications/Matlab_2012a/bin/glnxa64 -lmx -lmex -lmat -lm
arguments = -DMX_COMPAT_32
-> LD = gcc-4.4
-> Link flags:
LDFLAGS = -pthread -shared -Wl,--version-script,/home/iggy/Applications/Matlab_2012a/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined
LDDEBUGFLAGS = -g
LDOPTIMFLAGS = -O
LDEXTENSION = .mexa64
arguments =
-> LDCXX =
-> Link flags:
LDCXXFLAGS =
LDCXXDEBUGFLAGS =
LDCXXOPTIMFLAGS =
LDCXXEXTENSION =
arguments =
----------------------------------------------------------------
-> gcc-4.4 -c -I/home/iggy/Applications/Matlab_2012a/extern/include -I/home/iggy/Applications/Matlab_2012a/simulink/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread -DMX_COMPAT_32 -O -DNDEBUG "csolve.c"
-> gcc-4.4 -c -I/home/iggy/Applications/Matlab_2012a/extern/include -I/home/iggy/Applications/Matlab_2012a/simulink/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread -DMX_COMPAT_32 -O -DNDEBUG "ldl.c"
-> gcc-4.4 -c -I/home/iggy/Applications/Matlab_2012a/extern/include -I/home/iggy/Applications/Matlab_2012a/simulink/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread -DMX_COMPAT_32 -O -DNDEBUG "matrix_support.c"
-> gcc-4.4 -c -I/home/iggy/Applications/Matlab_2012a/extern/include -I/home/iggy/Applications/Matlab_2012a/simulink/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread -DMX_COMPAT_32 -O -DNDEBUG "solver.c"
-> gcc-4.4 -c -I/home/iggy/Applications/Matlab_2012a/extern/include -I/home/iggy/Applications/Matlab_2012a/simulink/include -DMATLAB_MEX_FILE -ansi -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread -DMX_COMPAT_32 -O -DNDEBUG "util.c"
-> gcc-4.4 -O -pthread -shared -Wl,--version-script,/home/iggy/Applications/Matlab_2012a/extern/lib/glnxa64/mexFunction.map -Wl,--no-undefined -o "csolve.mexa64" csolve.o ldl.o matrix_support.o solver.o util.o -Wl,-rpath-link,/home/iggy/Applications/Matlab_2012a/bin/glnxa64 -L/usr/lib32 -L/home/iggy/Applications/Matlab_2012a/bin/glnxa64 -lmx -lmex -lmat -lm -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib32/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib32/libm.a when searching for -lm
/usr/bin/ld: cannot find -lstdc++
/usr/bin/ld: skipping incompatible /usr/lib32/libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib32/libpthread.a when searching for -lpthread
collect2: ld returned 1 exit status
mex: link of ' "csolve.mexa64"' failed.
Error using mex (line 206)
Unable to complete successfully.
Error in make_csolve (line 10)
mex -v csolve.c ldl.c matrix_support.c solver.c util.c
Any advice would be greatly appreciated (I am on Ubuntu 12.04 64-bit running MATLAB R2012a).
The libraries in /use/lib32 are incompatible because they are the wrong architecture (32-bit instead of 64-bit). Try running mex -setup again first. I'm assuming you're using 64-bit MATLAB (check with ver) since there are glnxa64 folders in the current setup.
However, the real error seems to be the following:
/home/iggy/Applications/Matlab_2012a/bin/mex: 1: /home/iggy/Applications/Matlab_2012a/bin/util/oscheck.sh: /lib64/libc.so.6: not found
Since oscheck.sh fails to find /lib64/libc.so.6, you might need to go into the package manage and look for libc and libstdc++, install them and try again. But first try to make a link to any existing libc.so.6 in another folder. Typical locations for Ubuntu are below.
64-bit Ubuntu:
sudo ln -s /lib/x86_64-linux-gnu/libc.so.6 /lib64/libc.so.6
32-bit Ubuntu:
sudo ln -s /lib/i386-linux-gnu/libc.so.6 /lib/libc.so.6
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.
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
I'm facing a very similar problem as I'm trying to install psycopg2 onto Mac OS 10.6.3; it claims it can't find "stdarg.h" but I can see it's there; what should I do? (except I'm on OS X 10.7 and PostgreSQL v 9.0.5), and I'm thinking about changing my psql config c-compiler.
When I type pg_config in terminal I get:
BINDIR = /usr/bin
DOCDIR = /usr/share/doc/postgresql
HTMLDIR = /Library/WebServer/Documents/postgresql
INCLUDEDIR = /usr/include
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/server
LIBDIR = /usr/lib
PKGLIBDIR = /usr/lib/postgresql
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/man
SHAREDIR = /usr/share/postgresql
SYSCONFDIR = /private/etc/postgresql
PGXS = /usr/lib/postgresql/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--disable-dependency-tracking' '--prefix=/usr' '--sbindir=/usr/libexec' '--sysconfdir=/private/etc' '--localstatedir=/var/pgsql' '--htmldir=/Library/WebServer/Documents/postgresql' '--enable-thread-safety' '--enable-dtrace' '--with-tcl' '--with-perl' '--with-python' '--with-gssapi' '--with-krb5' '--with-pam' '--with-ldap' '--with-bonjour' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-system-tzdata=/usr/share/zoneinfo' 'CFLAGS=-arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations' 'LDFLAGS=-arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations' 'LDFLAGS_EX=-mdynamic-no-pic'
CC = gcc
CPPFLAGS = -I/usr/include/libxml2
CFLAGS = -arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
CFLAGS_SL =
LDFLAGS = -arch x86_64 -arch i386 -pipe -Os -g -Wall -Wno-deprecated-declarations -Wl,-dead_strip_dylibs
LDFLAGS_EX = -mdynamic-no-pic
LDFLAGS_SL =
LIBS = -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm
VERSION = PostgreSQL 9.0.5
I'm wondering how to change pg_config (so I can set CC = gcc-4.2) or something along those lines.
pg_config is just a util that provides information, it is not a "config" in the typical sense that you can edit properties. If you want to change a value that pg_config provides, you will need to manually do so outside of the util (in your case, you will need to install a new C compiler).