[MacPorts] #51520: llvm-3.9 @3.9-r270400_0+assertions+debug build failure on snow leopard due to missing strnlen function - and fix

MacPorts noreply at macports.org
Sun May 29 21:45:34 PDT 2016


#51520: llvm-3.9 @3.9-r270400_0+assertions+debug build failure on snow leopard due
to missing strnlen function - and fix
------------------------------------+--------------------------------
 Reporter:  kenneth.f.cunningham@…  |      Owner:  macports-tickets@…
     Type:  defect                  |     Status:  new
 Priority:  Normal                  |  Milestone:
Component:  ports                   |    Version:  2.3.4
 Keywords:  snowleopard             |       Port:  llvm-3.9
------------------------------------+--------------------------------
 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);
 }

-- 
Ticket URL: <https://trac.macports.org/ticket/51520>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list