Opened 8 years ago

Closed 8 years ago

#51744 closed defect (worksforme)

valgrind : Undefined symbols; "___divti3", referenced from: :info:build ___muloti4 in libclang_rt.osx.a(muloti4.o)

Reported by: simon@… Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc:
Port: valgrind

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hello all — I am having trouble installing valgrind on Mac OS X 10.10.5 (Yosemite). It appears to be associated with an undefined symbol in libclang. Any thoughts?

Simon

:info:build mv -f m_ume/.deps/libcoregrind_amd64_darwin_a-macho.Tpo m_ume/.deps/libcoregrind_amd64_darwin_a-macho.Po
:info:build Undefined symbols for architecture x86_64:
:info:build   "___divti3", referenced from:
:info:build       ___muloti4 in libclang_rt.osx.a(muloti4.o)
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[3]: *** [vgpreload_core-amd64-darwin.so] Error 1
:info:build make[3]: *** Waiting for unfinished jobs....
:info:build mv -f m_mach/.deps/libcoregrind_amd64_darwin_a-mach_vmUser.Tpo m_mach/.deps/libcoregrind_amd64_darwin_a-mach_vmUser.Po
:info:build mv -f m_mach/.deps/libcoregrind_amd64_darwin_a-vm_mapUser.Tpo m_mach/.deps/libcoregrind_amd64_darwin_a-vm_mapUser.Po
:info:build mv -f m_mach/.deps/libcoregrind_amd64_darwin_a-thread_actUser.Tpo m_mach/.deps/libcoregrind_amd64_darwin_a-thread_actUser.Po
:info:build mv -f m_mach/.deps/libcoregrind_amd64_darwin_a-taskUser.Tpo m_mach/.deps/libcoregrind_amd64_darwin_a-taskUser.Po
:info:build mv -f m_syswrap/.deps/libcoregrind_amd64_darwin_a-syswrap-generic.Tpo m_syswrap/.deps/libcoregrind_amd64_darwin_a-syswrap-generic.Po
:info:build mv -f m_syswrap/.deps/libcoregrind_amd64_darwin_a-syswrap-darwin.Tpo m_syswrap/.deps/libcoregrind_amd64_darwin_a-syswrap-darwin.Po
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_valgrind/valgrind/work/valgrind-3.11.0/coregrind'
:info:build make[2]: *** [all] Error 2
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_valgrind/valgrind/work/valgrind-3.11.0/coregrind'
:info:build make[1]: *** [all-recursive] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_valgrind/valgrind/work/valgrind-3.11.0'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_valgrind/valgrind/work/valgrind-3.11.0'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_valgrind/valgrind/work/valgrind-3.11.0" && /usr/bin/make -j8 -w all 
:info:build Exit code: 2
:error:build org.macports.build for port valgrind returned: command execution failed
:debug:build Error code: CHILDSTATUS 69467 2
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"portbuild::build_main org.macports.build"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
:info:build Warning: targets not executed for valgrind: org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Please see the log file for port valgrind for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_valgrind/valgrind/main.log
ayerie:SFIHMM simon$ sudo port install valgrind
--->  Computing dependencies for valgrind
--->  Building valgrind
Error: org.macports.build for port valgrind returned: command execution failed
Please see the log file for port valgrind for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_valgrind/valgrind/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port valgrind failed

Attachments (1)

valg_error.txt (21.3 KB) - added by simon@… 8 years ago.
main.log

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by simon@…

Attachment: valg_error.txt added

main.log

comment:1 Changed 8 years ago by simon@…

I was able to get this running by explicitly forcing the compiler to be /usr/bin/llvm-gcc-4.2 (nothing else worked!) Perhaps this is a way to get valgrind working.

comment:2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: valgrind removed
Owner: changed from macports-tickets@… to raimue@…

/usr/bin/llvm-gcc-4.2 should not exist on a Yosemite system. Apple stopped including llvm-gcc-4.2 as of Xcode 5.0. Yosemite requires Xcode versions ≥ 6.1 < 7.3.

Don't forget to use WikiFormatting when writing in Trac.

comment:3 Changed 8 years ago by raimue (Rainer Müller)

I can't reproduce this problem on OS X 10.10.5 using Xcode 7.2.1. Please make sure you are using the latest Xcode.

/usr/bin/llvm-gcc still exists, but it should be just a symlink to clang.

comment:4 Changed 8 years ago by simon@…

You are all absolutely correct. It looks like I had some older versions of gcc hanging out in /usr/local/bin — and my PATH was set so that /usr/local/bin came before /usr/bin.

Once I (1) upgraded XCode, and (2) edited my .bashrc to fix the export PATH statement, macports was able to use the new versions of gcc, and valgrind installed without a hitch. I actually ended up doing a total migration, since I wasn't sure how long the system had been using those ancient compilers.

Thank you for your help, ryandesign. I would not have noticed how out of date my compilers were without your pointing them out. Perhaps there could be a "recommended" PATH variable to help newcomers?

Last edited 8 years ago by simon@… (previous) (diff)

comment:5 Changed 8 years ago by raimue (Rainer Müller)

Resolution: worksforme
Status: newclosed

Glad you got it resolved. Your custom PATH is actually ignored completely by MacPorts, unless you changed that in macports.conf.

Note: See TracTickets for help on using tickets.