"tcerl-1.3.1h" and 'tcerldrv-1.3.1g' fail to build on OSX with Erlang R13B03

8 views
Skip to first unread message

Zabrane

unread,
Dec 18, 2009, 9:03:32 AM12/18/09
to mnesiaex-discuss
Hi List!

I tried to build "tcerl-1.3.1h" and 'tcerldrv-1.3.1g' on my OSX10.5.8
(gcc 4.0.1), but they won't complile cleanly:

=========================================
$ cd tcerl-1.3.1h
$ ./configure --prefix=/usr
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of
Makefiles... no
checking for erlang module mnesia_ext... no
checking for erlang module eunit... yes
configure: enabling erlrc integration
checking for erlc... erlc
checking for revision control type... none (autodetected)
checking for native package type... none (autodetected)
checking for ldd... no
checking for otool... otool
checking for dash... no
checking for ash... no
checking for sh... /bin/sh
configure: creating ./config.status
config.status: creating src/tcerlprefix.hrl
config.status: creating doc/Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating src/fw-erl-app-template.app
config.status: creating Makefile
config.status: creating fw-pkgin/Makefile


$ make
Making all in fw-pkgin
Making all in src
erlc +debug_info -pa "/share/fw/template/erlang/" -pa "/share/fw.local/
template/erlang" -pa "../fw/template/erlang/" -pa "../fw.local/
template/erlang" -pa ../src -I ../src +'{ parse_transform,
vsn_trans }' +"{ fw_package_version, '1.3.1h' }" +'{ parse_transform,
oldrecord_trans }' -DHAVE_EUNIT=1 tcbdb.erl
erlc +debug_info -pa "/share/fw/template/erlang/" -pa "/share/fw.local/
template/erlang" -pa "../fw/template/erlang/" -pa "../fw.local/
template/erlang" -pa ../src -I ../src +'{ parse_transform,
vsn_trans }' +"{ fw_package_version, '1.3.1h' }" +'{ parse_transform,
oldrecord_trans }' -DHAVE_EUNIT=1 tcbdbets.erl
erlc +debug_info -pa "/share/fw/template/erlang/" -pa "/share/fw.local/
template/erlang" -pa "../fw/template/erlang/" -pa "../fw.local/
template/erlang" -pa ../src -I ../src +'{ parse_transform,
vsn_trans }' +"{ fw_package_version, '1.3.1h' }" +'{ parse_transform,
oldrecord_trans }' -DHAVE_EUNIT=1 tcbdbmsutil.erl
./tcbdbmsutil.erl:23: type ref() undefined
./tcbdbmsutil.erl:232: Warning: type bool() is now called boolean();
please use the new name instead
./tcbdbmsutil.erl:259: Warning: type bool() is now called boolean();
please use the new name instead
./tcbdbmsutil.erl:301: Warning: type bool() is now called boolean();
please use the new name instead
./tcbdbmsutil.erl:318: Warning: type bool() is now called boolean();
please use the new name instead
make[2]: *** [tcbdbmsutil.beam] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
=========================================

It seems that the API changed a bit. For example, "bool()" type is now
called "boolean()". See footnote[1] below which includes the fix !

Moreover, 'tcerldrv-1.3.1g' complains about duplicate 'socklen_t'
definition:

=========================================
$ cd tcerldrv-1.3.1g
$ ./configure --prefix=/usr && make
Making all in fw-pkgin
make[2]: Nothing to be done for `all-am'.
Making all in src
make all-recursive
if /bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -
I. -I. -I /usr/lib/erlang/lib/erl_interface-3.6.4/include -I /usr/
lib/erlang/lib/erl_interface-3.6.4/src/legacy -I /usr/lib/erlang/lib/
erl_interface-3.6.4/src/misc/ -I /usr/lib/erlang/lib/
erl_interface-3.6.4/src/decode -I /usr/lib/erlang/erts-5.7.4/include -
W -Wall -Werror -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-
prototypes -g -O2 -MT my_decode_skip.lo -MD -MP -MF ".deps/
my_decode_skip.Tpo" -c -o my_decode_skip.lo my_decode_skip.c; \
then mv -f ".deps/my_decode_skip.Tpo" ".deps/my_decode_skip.Plo";
else rm -f ".deps/my_decode_skip.Tpo"; exit 1; fi
gcc -DHAVE_CONFIG_H -I. -I. -I. -I /usr/lib/erlang/lib/
erl_interface-3.6.4/include -I /usr/lib/erlang/lib/erl_interface-3.6.4/
src/legacy -I /usr/lib/erlang/lib/erl_interface-3.6.4/src/misc/ -I /
usr/lib/erlang/lib/erl_interface-3.6.4/src/decode -I /usr/lib/erlang/
erts-5.7.4/include -W -Wall -Werror -Wpointer-arith -Wcast-align -
Wwrite-strings -Wmissing-prototypes -g -O2 -MT my_decode_skip.lo -MD -
MP -MF .deps/my_decode_skip.Tpo -c my_decode_skip.c -fno-common -DPIC
-o .libs/my_decode_skip.o
In file included from my_decode_skip.c:20:
/usr/lib/erlang/lib/erl_interface-3.6.4/src/misc/eidef.h:41: error:
conflicting types for 'socklen_t'
/usr/include/sys/socket.h:108: error: previous declaration of
'socklen_t' was here
make[3]: *** [my_decode_skip.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
=========================================

Stupid autotools ! A simple workaround is to recompile like this:
$ CFLAGS="-DHAVE_SOCKLEN_T" ./configure --prefix=/usr --enable-shared
$ make && make install

After that, everything should be fine:

$ erl
1>tcerl:start().
ok

[1] the patch "tcerl-1.3.1h.patch.gz" for "tcerl-1.3.1h" can be found
at:
http://groups.google.com/group/mnesiaex-discuss/files


Regards
Zabrane

paul mineiro

unread,
Dec 21, 2009, 10:42:43 PM12/21/09
to mnesiaex-discuss
Thanks Zabrane!

-- p

Reply all
Reply to author
Forward
0 new messages