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 Version 1

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

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

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 (1)

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

Cc: jeremyhu@… removed
Description: modified (diff)
Owner: changed from macports-tickets@… to jeremyhu@…
Note: See TracTickets for help on using tickets.