[MacPorts] #50139: mesa @11.1 won't build on Mac OS X 10.6.8, Snow Leopard, because of use of strndup

MacPorts noreply at macports.org
Sat Dec 26 15:25:53 PST 2015


#50139: mesa @11.1 won't build on Mac OS X 10.6.8, Snow Leopard, because of use of
strndup
-----------------------------+--------------------------------
 Reporter:  Peter_Dyballa@…  |      Owner:  macports-tickets@…
     Type:  defect           |     Status:  new
 Priority:  Normal           |  Milestone:
Component:  ports            |    Version:  2.3.4
 Keywords:                   |       Port:  mesa
-----------------------------+--------------------------------
 {{{
 libtool: compile:  /usr/bin/clang++ -DPACKAGE_NAME=\"Mesa\"
 -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"11.1.0\"
 "-DPACKAGE_STRING=\"Mesa 11.1.0\""
 "-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\""
 -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"11.1.0\"
 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DHAVE___BUILTIN_BSWAP32=1
 -DHAVE___BUILTIN_BSWAP64=1 -DHAVE___BUILTIN_CLZ=1 -DHAVE___BUILTIN_CLZLL=1
 -DHAVE___BUILTIN_CTZ=1 -DHAVE___BUILTIN_EXPECT=1 -DHAVE___BUILTIN_FFS=1
 -DHAVE___BUILTIN_FFSLL=1 -DHAVE___BUILTIN_POPCOUNT=1
 -DHAVE___BUILTIN_POPCOUNTLL=1 -DHAVE___BUILTIN_UNREACHABLE=1
 -DHAVE_FUNC_ATTRIBUTE_CONST=1 -DHAVE_FUNC_ATTRIBUTE_FORMAT=1
 -DHAVE_FUNC_ATTRIBUTE_MALLOC=1 -DHAVE_FUNC_ATTRIBUTE_PACKED=1
 -DHAVE_FUNC_ATTRIBUTE_PURE=1 -DHAVE_FUNC_ATTRIBUTE_UNUSED=1
 -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT=1 -DHAVE_DLADDR=1
 -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1
 -DHAVE_SHA1_IN_COMMONCRYPTO=1 -I. -I../../include -I../../src
 -I../../src/mapi -I../../src/mesa/ -I../../src/gallium/include
 -I../../src/gallium/auxiliary -I../../src/glsl/glcpp -I../../src/glsl/nir
 -I../../src/gtest/include -I../../src/glsl/nir -D__STDC_LIMIT_MACROS
 -DUSE_SSE41 -DNDEBUG -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_STRTOF
 -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_SHA1 -DGLX_USE_APPLEGL
 -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_ALIAS_UNSUPPORTED
 -DBUILDING_MESA -DMESA_EGL_NO_X11_HEADERS -fvisibility=hidden -Werror
 =pointer-arith -Werror=vla -pipe -Os -arch x86_64 -stdlib=libstdc++ -Wall
 -fno-strict-aliasing -fno-builtin-memcmp -Qunused-arguments -MT
 link_atomics.lo -MD -MP -MF .deps/link_atomics.Tpo -c link_atomics.cpp
 -fno-common -DPIC -o .libs/link_atomics.o
 linker.cpp:3479:11: error: use of undeclared identifier 'strndup'; did you
 mean 'strdup'?
    return strndup(name, name_size);
           ^~~~~~~
           strdup
 /usr/include/string.h:116:7: note: 'strdup' declared here
 char    *strdup(const char *);
          ^
 linker.cpp:3479:25: error: too many arguments to function call, expected
 1, have 2
    return strndup(name, name_size);
           ~~~~~~~       ^~~~~~~~~
 linker.cpp:3490:11: error: use of undeclared identifier 'strndup'; did you
 mean 'strdup'?
    return strndup(first_dot+1, strlen(first_dot) - 1);
           ^~~~~~~
           strdup
 /usr/include/string.h:116:7: note: 'strdup' declared here
 char    *strdup(const char *);
          ^
 linker.cpp:3490:32: error: too many arguments to function call, expected
 1, have 2
    return strndup(first_dot+1, strlen(first_dot) - 1);
           ~~~~~~~              ^~~~~~~~~~~~~~~~~~~~~
 1 warning and 4 errors generated.
 make[3]: *** [linker.lo] Error 1
 make[3]: *** Waiting for unfinished jobs....

 make[3]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-11.1.0/src/glsl'
 make[2]: *** [all] Error 2
 make[2]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-11.1.0/src/glsl'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-11.1.0/src'
 make: *** [all-recursive] Error 1
 make: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-11.1.0'
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_x11_mesa/mesa/work/mesa-11.1.0"
 && /usr/bin/make -j8 -w all
 }}}

 Snow Leopard does not seem to know `strndup` (therefore Cairo is bringing
 its own version: `cairo-1.14.6/util/cairo-missing/strndup.c`).

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


More information about the macports-tickets mailing list