[erlang-questions] Compiling otp_src_R13B03 on AIX 5.2

chan sisowath chan.sisowath@REDACTED
Fri Jan 22 11:09:27 CET 2010


hi,

i patched otp_src_R13B03 following this
http://old.nabble.com/attachment/17957627/0/erlang-aix.diff (patch for
R12B-2)

my env:

GCC -v:
Reading specs from
/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/specs
Configured with: ../configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld
--disable-nls --enable-languages=c,c++ --prefix=/opt/freeware
--enable-threads --enable-version-specific-runtime-libs
--host=powerpc-ibm-aix5.2.0.0
Thread model: aix
gcc version 3.3.2

configure:
$>sh configure --prefix=$NX_ROOT/temp/tmpc/SRC/root

i had 2 error durring the compilation:

drivers/common/inet_drv.c: In function `inet_ctl_fdopen':
drivers/common/inet_drv.c:3755: warning: passing arg 3 of `ngetsockname'
from incompatible pointer type
drivers/common/inet_drv.c:3767: warning: passing arg 3 of `ngetpeername'
from incompatible pointer type
drivers/common/inet_drv.c: In function `inet_ctl_ifget':
drivers/common/inet_drv.c:4276: error: `IFF_MULTICAST' undeclared (first use
in this function)
drivers/common/inet_drv.c:4276: error: (Each undeclared identifier is
reported only once
drivers/common/inet_drv.c:4276: error: for each function it appears in.)
drivers/common/inet_drv.c: In function `inet_fill_opts':

...
and
...

../unix/run_erl.c: In function `open_pty_master':
../unix/run_erl.c:868: warning: implicit declaration of function
`posix_openpt'
../unix/run_erl.c: In function `set_window_size':
../unix/run_erl.c:1258: error: storage size of `ws' isn't known
../unix/run_erl.c:1261: warning: implicit declaration of function `ioctl'
../unix/run_erl.c:1261: error: invalid application of `sizeof' to an
incomplete type
../unix/run_erl.c:1258: warning: unused variable `ws'
make[4]: ***
[/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/erts/obj/powerpc-ibm-aix5.2.0.0/run_erl.o]
Error 1
make[4]: Leaving directory
`/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/erts/etc/common'
make[3]: *** [opt] Error 2
make[3]: Leaving directory
`/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/erts/etc/common'
make[2]: *** [opt] Error 2
make[2]: Leaving directory
`/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/erts/etc'
make[1]: *** [opt] Error 2
make[1]: Leaving directory
`/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/erts'
make: *** [emulator] Error 2

i solve the first one by adding a define in the file
erts/emulator/drivers/common/inet_drv.c
#ifndef _OSE_
#ifdef HAVE_MULTICAST_SUPPORT
  #define IP_MULTICAST 1
#endif
 #include <net/if.h>
#else
 #define IFF_MULTICAST 0x00000800
#endif

for the second error:
in the file  erts/etc/unix/run_erl.c
#ifdef HAVE_SYS_IOCTL_H
#ifndef _ALL_SOURCE
#define _ALL_SOURCE 1
#endif
#include <sys/ioctl.h>
#endif

i don't know if it is the right thing to do.
(if you have a better solution i m a ware)
after that i have this one I don't know what to do.

make[3]: Entering directory
`/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/lib/asn1/src'
make[3]: Nothing to be done for `opt'.
make[3]: Leaving directory
`/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/lib/asn1/src'
make[3]: Entering directory
`/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/lib/asn1/doc/src'
make[3]: Nothing to be done for `opt'.
make[3]: Leaving directory
`/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/lib/asn1/doc/src'
make[3]: Entering directory
`/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/lib/asn1/c_src'
make -f powerpc-ibm-aix5.2.0.0/Makefile TYPE=opt
make[4]: Entering directory
`/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/lib/asn1/c_src'
gcc  -bnoentry -bexpall -G
-L/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/lib/erl_interface/obj/powerpc-ibm-aix5.2.0.0
-o
/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/lib/asn1/priv/lib/powerpc-ibm-aix5.2.0.0/asn1_erl_drv.so
/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/lib/asn1/priv/obj/powerpc-ibm-aix5.2.0.0/asn1_erl_drv.o
-lei  -lc -ldl -lm
gcc: couldn't run `expall-gcc-3.3.2': No such file or directory
make[4]: ***
[/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/lib/asn1/priv/lib/powerpc-ibm-aix5.2.0.0/asn1_erl_drv.so]
Error 1
make[4]: Leaving directory
`/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/lib/asn1/c_src'
make[3]: *** [opt] Error 2
make[3]: Leaving directory
`/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/lib/asn1/c_src'
make[2]: *** [opt] Error 2
make[2]: Leaving directory
`/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/lib/asn1'
make[1]: *** [opt] Error 2
make[1]: Leaving directory
`/applis/list/oasis/oasis/produit/temp/tmpc/SRC/otp_src_R13B03/lib'
make: *** [libs] Error 2


if you have any suggestion, it would be nice.
thx.


More information about the erlang-questions mailing list