Opened 8 years ago

Last modified 8 years ago

#51520 closed defect

llvm-3.9 @3.9-r270400_0+assertions+debug build failure on snow leopard due to missing strnlen function - and fix — at Initial Version

Reported by: kenneth.f.cunningham@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: snowleopard Cc: jeremyhu@…
Port: llvm-3.9 clang-3.9

Description

Sorry I haven't figured out the diff files just yet.

llvm-3.9 build fails at 12% and then at 98% with error strnlen function not found

to fix:

in this file

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.9/llvm-3.9/work/trunk/lib/ObjectYAML/MachOYAML.cpp

and in this file

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.9/llvm-3.9/work/trunk/tools/obj2yaml/macho2yaml.cpp

add this replacement function after <string.h> and build succeeds

(found an example in the cctools patches):

static size_t strnlen(const char *s, size_t maxlen) {

size_t len;

for (len = 0; len < maxlen; len++, s++) {

if (!*s)

break;

} return (len);

}

Change History (0)

Note: See TracTickets for help on using tickets.