Opened 5 months ago

Last modified 5 months ago

#54411 assigned defect

elftoolchain @0.7.1 won't build on Snow Leopard, Mac OS X 10.6.8, (cxx_stdlib = libc++) because of "Undefined symbols for architecture x86_64"

Reported by: ballapete (Peter Dyballa) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 2.4.1
Keywords: snowleopard legacy-os Cc:
Port: elftoolchain

Description

--- readelf ---
/opt/local/bin/clang-mp-3.9  -L../libdwarf -L../libelf -L../libelftc -L/opt/local/lib  -o readelf  readelf.o -ldwarf -lelftc -lelf  -L.
Undefined symbols for architecture x86_64:
  "_strnlen", referenced from:
      _dump_notes_content in readelf.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
*** [readelf] Error code 1

Attachments (2)

main.log (518.9 KB) - added by ballapete (Peter Dyballa) 5 months ago.
main.log
main.2.log (82.7 KB) - added by ballapete (Peter Dyballa) 5 months ago.
cannot download patch files

Download all attachments as: .zip

Change History (6)

Changed 5 months ago by ballapete (Peter Dyballa)

main.log

comment:1 Changed 5 months ago by raimue (Rainer Müller)

  • Cc raimue@… removed
  • Keywords legacy-os added
  • Owner set to raimue
  • Status changed from new to assigned

Sorry, but I don't care about legacy OS versions and I will not look into this myself. If you could provide a patch, I would of course commit it.

comment:2 Changed 5 months ago by kencu (Ken)

snowleopardfixes fixes this:

platform darwin 10 {
	depends_lib-append          port:snowleopardfixes
	configure.ldflags-append   -lsnowleopardfixes
}

-- or patch the strnlen function in manually where needed, eg readelf.c, most likely

comment:3 Changed 5 months ago by ballapete (Peter Dyballa)

Before I could try that I need the patch files mentioned in Portfile. But they cannot be found…

Changed 5 months ago by ballapete (Peter Dyballa)

cannot download patch files

comment:4 Changed 5 months ago by kencu (Ken)

I'll make a PR with the snowleopard_fixes portgroup, which solves this.

Note: See TracTickets for help on using tickets.