[erlang-questions] OTP13B03 failed to make parallel on OS X 10.6 in 64-bit: ld: duplicate symbol in libei.a(ei_portio.o) (ei_connect.o)

Ceriel Jacobs <>
Wed Dec 16 16:21:28 CET 2009


Thanks, 
after removing the line from erts/emulator/beam/global.h,
the ./configure runs without breaking.

Though a parallel 'make -j2' does not run without errors.
Q1: Is a parallel build supported or explicitly not? 

Seven times, this "cc1: error: too many filenames given.  Type cc1 --help for usage" occurs. An example:

gcc -MM -MG -mdynamic-no-pic -m64 -fast -arch x86_64 -march=nocona -mtune=generic -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -I/Users/user/src/otp_src_R13B03/erts/i686-apple-darwin10  -no-cpp-precomp    -DHAVE_CONFIG_H -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT  -Ii686-apple-darwin10/opt/plain -Ibeam -Isys/unix -Isys/common -Ii686-apple-darwin10 -Izlib  -Ipcre -Ihipe -I../include -I../include/i686-apple-darwin10 -I../include/internal -I../include/internal/i686-apple-darwin10 -Idrivers/common beam/atom.c beam/beam_bif_load.c beam/beam_bp.c beam/beam_catches.c beam/beam_debug.c beam/beam_emu.c beam/beam_load.c beam/benchmark.c beam/bif.c beam/big.c beam/binary.c beam/break.c beam/copy.c beam/dist.c beam/elib_malloc.c beam/elib_memmove.c beam/erl_afit_alloc.c beam/erl_alloc.c beam/erl_alloc_util.c beam/erl_arith.c beam/erl_async.c beam/erl_bestfit_alloc.c beam/erl_bif_chksum.c beam/erl_bif_ddll.c beam/erl_bif_guard.c beam/erl_bif_info.c beam/erl_bif_lists.c beam/erl_bif_op.c beam/erl_bif_os.c beam/erl_bif_port.c beam/erl_bif_re.c beam/erl_bif_timer.c beam/erl_bif_trace.c beam/erl_bits.c beam/erl_db.c beam/erl_db_hash.c beam/erl_db_tree.c beam/erl_db_util.c beam/erl_debug.c beam/erl_drv_thread.c beam/erl_fun.c beam/erl_gc.c beam/erl_goodfit_alloc.c beam/erl_init.c beam/erl_instrument.c beam/erl_lock_check.c beam/erl_lock_count.c beam/erl_math.c beam/erl_md5.c beam/erl_message.c beam/erl_monitors.c beam/erl_mtrace.c beam/erl_nif.c beam/erl_nmgc.c beam/erl_node_tables.c beam/erl_obsolete.c beam/erl_port_task.c beam/erl_posix_str.c beam/erl_printf_term.c beam/erl_process.c beam/erl_process_dict.c beam/erl_process_dump.c beam/erl_process_lock.c beam/erl_resolv_dns.c beam/erl_resolv_nodns.c beam/erl_term.c beam/erl_time_sup.c beam/erl_trace.c beam/erl_unicode.c beam/erl_zlib.c beam/export.c beam/external.c beam/fix_alloc.c beam/hash.c beam/index.c beam/io.c beam/module.c beam/packet_parser.c beam/register.c beam/safe_hashcd /Users/user/src/otp_src_R13B03/erts/lib_src && make opt
.c beam/time.c beam/utils.c \
		| sed 's|^\([^:]*:\)|$(OBJDIR)/\1|g;s|i686-apple-darwin10/opt/plain/|$(TTF_DIR)/|g;s|\([ 	]\)/Users/user/src/otp_src_R13B03/|\1$(ERL_TOP)/|g;s|^/Users/user/src/otp_src_R13B03/|$(ERL_TOP)/|g;s|$(OBJDIR)/erl_poll.o|$(OBJDIR)/erl_poll.kp.o $(OBJDIR)/erl_poll.nkp.o|g;s|$(OBJDIR)/erl_check_io.o|$(OBJDIR)/erl_check_io.kp.o $(OBJDIR)/erl_check_io.nkp.o|g' > i686-apple-darwin10/depend.mk
make -f i686-apple-darwin10/Makefile TYPE=opt
/bin/mkdir -p obj/i686-apple-darwin10/opt
cc1: error: too many filenames given.  Type cc1 --help for usage

Let me start over again: 'sudo make clean', './configure ...' and 'make' (now without -j)
The "cc1: error: too many filenames given." errors are still there.
Now the make stops with a 'ld: duplicate symbol' error:

gcc -fast -arch x86_64 -march=nocona -mtune=generic -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -DEI_64BIT -no-cpp-precomp -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -fno-strict-aliasing -I. -I../include -Iconnect -Iencode -Idecode -Imisc -Iepmd -Iregistry -Ii686-apple-darwin10   -Ilegacy -D_REENTRANT -D_THREAD_SAFE -DPOSIX_THREADS -fast -arch x86_64 -march=nocona -mtune=generic -isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -o /Users/user/src/otp_src_R13B03/lib/erl_interface/bin/i686-apple-darwin10/erl_call prog/erl_call.c prog/erl_start.c \
		-L/Users/user/src/otp_src_R13B03/lib/erl_interface/obj/i686-apple-darwin10 -lei -lpthread 
ld: duplicate symbol _ei_tracelevel in /Users/user/src/otp_src_R13B03/lib/erl_interface/obj/i686-apple-darwin10/libei.a(ei_portio.o) and /Users/user/src/otp_src_R13B03/lib/erl_interface/obj/i686-apple-darwin10/libei.a(ei_connect.o)
collect2: ld returned 1 exit status
make[4]: *** [/Users/user/src/otp_src_R13B03/lib/erl_interface/bin/i686-apple-darwin10/erl_call] Error 1
make[3]: *** [opt] Error 2
make[2]: *** [opt] Error 2
make[1]: *** [opt] Error 2
make: *** [libs] Error 2

Q2: Any suggestions how to pass beyond this barrier?

~Ceriel Jacobs

On 16 dec 2009, at 11:03 Sverker Eriksson wrote:
> Try remove this line from erts/emulator/beam/global.h:
> 
>   struct erl_heap_fragment* saved_program_buf;



More information about the erlang-questions mailing list