[MacPorts] #32836: Erlang compile error
#32836: Erlang compile error -------------------------------+-------------------------------------------- Reporter: lothar@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: -------------------------------+-------------------------------------------- Hi, when I try to install the erlang port on Mac OS X Lion, I run into the following compile error (full log attached): {{{ :info:build /opt/local/bin/gcc -mdynamic-no-pic -Ipcre -m64 -pipe -O3 -fomit-frame-pointer -arch x86_64 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B/erts/i386-apple-darwin11.2.0 -I/opt/local/include -D_XOPEN_SOURCE -DERTS_SMP -DHAVE_CONFIG_H -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -Ii386-apple- darwin11.2.0/opt/smp -Ibeam -Isys/unix -Isys/common -Ii386-apple- darwin11.2.0 -Izlib -Ipcre -Ihipe -I../include -I../include/i386-apple- darwin11.2.0 -I../include/internal -I../include/internal/i386-apple- darwin11.2.0 -c beam/beam_emu.c -o obj/i386-apple- darwin11.2.0/opt/smp/beam_emu.o :info:build cc1: error: unrecognized command line option "-mdynamic-no- pic" :info:build cc1: error: unrecognized command line option "-arch" :info:build make[3]: *** [obj/i386-apple-darwin11.2.0/opt/smp/beam_emu.o] Error 1 :info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B/erts/emulator' :info:build make[2]: *** [opt] Error 2 :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B/erts/emulator' :info:build make[1]: *** [smp] Error 2 :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B/erts' :info:build make: *** [emulator] Error 2 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B' :info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B" && /usr/bin/make -w all " returned error 2 :error:build Target org.macports.build returned: shell command failed (see log for details) :debug:build Backtrace: shell command failed (see log for details) while executing "command_exec build" (procedure "portbuild::build_main" line 8) invoked from within "$procedure $targetname" :info:build Warning: the following items did not execute (for erlang): org.macports.activate org.macports.build org.macports.destroot org.macports.install :notice:build Log for erlang is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/main.log }} To me it looks like a compiler problem. Might this be related to Ticket #31698? -- Ticket URL: <https://trac.macports.org/ticket/32836> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32836: erlang: build error when /opt/local/bin/gcc exists -------------------------------+-------------------------------------------- Reporter: lothar@… | Owner: bfulgham@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: erlang -------------------------------+-------------------------------------------- Changes (by ryandesign@…): * cc: lothar@… (removed) * owner: macports-tickets@… => bfulgham@… * port: => erlang Old description:
Hi,
when I try to install the erlang port on Mac OS X Lion, I run into the following compile error (full log attached):
{{{ :info:build /opt/local/bin/gcc -mdynamic-no-pic -Ipcre -m64 -pipe -O3 -fomit-frame-pointer -arch x86_64 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B/erts/i386-apple-darwin11.2.0 -I/opt/local/include -D_XOPEN_SOURCE -DERTS_SMP -DHAVE_CONFIG_H -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -Ii386-apple- darwin11.2.0/opt/smp -Ibeam -Isys/unix -Isys/common -Ii386-apple- darwin11.2.0 -Izlib -Ipcre -Ihipe -I../include -I../include/i386-apple- darwin11.2.0 -I../include/internal -I../include/internal/i386-apple- darwin11.2.0 -c beam/beam_emu.c -o obj/i386-apple- darwin11.2.0/opt/smp/beam_emu.o :info:build cc1: error: unrecognized command line option "-mdynamic-no- pic" :info:build cc1: error: unrecognized command line option "-arch" :info:build make[3]: *** [obj/i386-apple-darwin11.2.0/opt/smp/beam_emu.o] Error 1 :info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B/erts/emulator' :info:build make[2]: *** [opt] Error 2 :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B/erts/emulator' :info:build make[1]: *** [smp] Error 2 :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B/erts' :info:build make: *** [emulator] Error 2 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B' :info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B" && /usr/bin/make -w all " returned error 2 :error:build Target org.macports.build returned: shell command failed (see log for details) :debug:build Backtrace: shell command failed (see log for details) while executing "command_exec build" (procedure "portbuild::build_main" line 8) invoked from within "$procedure $targetname" :info:build Warning: the following items did not execute (for erlang): org.macports.activate org.macports.build org.macports.destroot org.macports.install :notice:build Log for erlang is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/main.log }}
To me it looks like a compiler problem. Might this be related to Ticket #31698?
New description: Hi, when I try to install the erlang port on Mac OS X Lion, I run into the following compile error (full log attached): {{{ :info:build /opt/local/bin/gcc -mdynamic-no-pic -Ipcre -m64 -pipe -O3 -fomit-frame-pointer -arch x86_64 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B/erts/i386-apple-darwin11.2.0 -I/opt/local/include -D_XOPEN_SOURCE -DERTS_SMP -DHAVE_CONFIG_H -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -Ii386-apple- darwin11.2.0/opt/smp -Ibeam -Isys/unix -Isys/common -Ii386-apple- darwin11.2.0 -Izlib -Ipcre -Ihipe -I../include -I../include/i386-apple- darwin11.2.0 -I../include/internal -I../include/internal/i386-apple- darwin11.2.0 -c beam/beam_emu.c -o obj/i386-apple- darwin11.2.0/opt/smp/beam_emu.o :info:build cc1: error: unrecognized command line option "-mdynamic-no- pic" :info:build cc1: error: unrecognized command line option "-arch" :info:build make[3]: *** [obj/i386-apple-darwin11.2.0/opt/smp/beam_emu.o] Error 1 :info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B/erts/emulator' :info:build make[2]: *** [opt] Error 2 :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B/erts/emulator' :info:build make[1]: *** [smp] Error 2 :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B/erts' :info:build make: *** [emulator] Error 2 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B' :info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/work /erlang-R15B" && /usr/bin/make -w all " returned error 2 :error:build Target org.macports.build returned: shell command failed (see log for details) :debug:build Backtrace: shell command failed (see log for details) while executing "command_exec build" (procedure "portbuild::build_main" line 8) invoked from within "$procedure $targetname" :info:build Warning: the following items did not execute (for erlang): org.macports.activate org.macports.build org.macports.destroot org.macports.install :notice:build Log for erlang is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_erlang/erlang/main.log }}} To me it looks like a compiler problem. Might this be related to Ticket #31698? -- Comment: The problem is that /opt/local/bin/gcc exists, and that erlang is using it. Presumably you have used "sudo port select gcc" to select a different compiler. (Which one?) The workaround is to use "sudo port select gcc" again to select the default compiler (or simply remove /opt/local/bin/gcc), then clean erlang and try again. The real fix will be to make erlang ensure it's UsingTheRightCompiler. -- Ticket URL: <https://trac.macports.org/ticket/32836#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32836: erlang: build error when /opt/local/bin/gcc exists -------------------------------+-------------------------------------------- Reporter: lothar@… | Owner: bfulgham@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: erlang -------------------------------+-------------------------------------------- Comment(by ryandesign@…): The problem may be that numerous files in the erlang source distribution hardcode /opt/local, /usr/local and other locations we don't want to look in: * aclocal.m4 * erts/aclocal.m4 * erts/configure.in * erts/test/install_SUITE.erl * lib/erl_interface/aclocal.m4 * lib/odbc/aclocal.m4 * lib/odbc/configure.in * lib/wx/aclocal.m4 -- Ticket URL: <https://trac.macports.org/ticket/32836#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32836: erlang: build error when /opt/local/bin/gcc exists -------------------------------+-------------------------------------------- Reporter: lothar@… | Owner: bfulgham@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: erlang -------------------------------+-------------------------------------------- Comment(by lothar@…): Ok, I selected the default compiler with: {{{ sudo port select gcc apple-gcc42 }}} and the build succeeded. -- Ticket URL: <https://trac.macports.org/ticket/32836#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32836: erlang: build error when /opt/local/bin/gcc exists -------------------------------+-------------------------------------------- Reporter: lothar@… | Owner: bfulgham@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: | Port: erlang -------------------------------+-------------------------------------------- Comment(by jmr@…): This appears to be erts/configure deciding that the compiler specified in CC can't handle jumptables, and then helpfully trying to find one that can and using that instead. It would be interesting to see the config.log for that. -- Ticket URL: <https://trac.macports.org/ticket/32836#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#32836: erlang: build error when /opt/local/bin/gcc exists -----------------------+------------------------ Reporter: lothar@… | Owner: bfulgham@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: | Keywords: Port: erlang | -----------------------+------------------------ Comment (by mojca@…): See also #35875. -- Ticket URL: <https://trac.macports.org/ticket/32836#comment:7> MacPorts <http://www.macports.org/> Ports system for OS X
#32836: erlang: build error when /opt/local/bin/gcc exists -----------------------+------------------------- Reporter: lothar@… | Owner: ciserlohn@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Resolution: | Keywords: Port: erlang | -----------------------+------------------------- Changes (by ciserlohn@…): * owner: bfulgham@… => ciserlohn@… -- Ticket URL: <https://trac.macports.org/ticket/32836#comment:8> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts