#57551 closed defect (duplicate)
cmake @3.12.4 does not build on Mac OS X 10.4.11, Tiger, because it does not knaw hat unsetenv() does no exist here
Reported by: | ballapete (Peter "Pete" Dyballa) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.5.4 |
Keywords: | tiger | Cc: | michaelld (Michael Dickens), kencu (Ken) |
Port: | cmake |
Description
/opt/local/bin/gcc-mp-6 -pipe -Os -m32 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Bootstrap.cmk -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Source -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Source/LexerParser -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities -DCMAKE_BOOTSTRAP -D_DARWIN_USE_64_BIT_INODE=1 -D_DARWIN_UNLIMITED_SELECT=1 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src -c /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix/core.c -o uv-src-unix-core.c.o /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix/core.c: In function 'uv_os_unsetenv': /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix/core.c:1296:7: error: void value not ignored as it ought to be if (unsetenv(name) != 0) ^~~~~~~~~~~~~~ gmake: *** [Makefile:392: uv-src-unix-core.c.o] Error 1 --------------------------------------------- Error when bootstrapping CMake: Problem while running gmake --------------------------------------------- Log of errors: /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Bootstrap.cmk/cmake_bootstrap.log --------------------------------------------- Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4" && ./configure --prefix=/opt/local --docdir=share/doc/cmake --parallel=1 --init=/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/macports.cmake --no-system-jsoncpp --no-system-librhash --no-system-libs --no-qt-gui
Attachments (2)
Change History (12)
Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
Attachment: | cmake_bootstrap.log added |
---|
Cmake bootstap
comment:1 follow-up: 3 Changed 6 years ago by michaelld (Michael Dickens)
Cc: | kencu added |
---|
@kencu: Is this a function we can get into "macports-legacy-support"? Seems like an obvious addition!
comment:2 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | michaelld added; michaelld@… removed |
---|---|
Keywords: | tiger added; titger removed |
Port: | cmake added |
Resolution: | → duplicate |
Status: | new → closed |
Duplicate of #55415.
comment:3 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
Replying to michaelld:
@kencu: Is this a function we can get into "macports-legacy-support"? Seems like an obvious addition!
Don't know. The code of the function is:
int uv_os_unsetenv(const char* name) { if (name == NULL) return UV_EINVAL; if (unsetenv(name) != 0) return UV__ERR(errno); return 0; }
My patch looks simply like this:
--- Utilities/cmlibuv/src/unix/core.c.orig 2018-11-02 13:15:50.000000000 +0100 +++ Utilities/cmlibuv/src/unix/core.c 2018-11-10 01:31:17.000000000 +0100 @@ -1293,8 +1293,13 @@ if (name == NULL) return UV_EINVAL; + /* Mac OS X 10.4, Tiger, has void unsetenv() */ +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 if (unsetenv(name) != 0) return UV__ERR(errno); +#else + unsetenv(name); +#endif return 0; }
comment:4 follow-ups: 5 9 Changed 6 years ago by kencu (Ken)
The libuv version in cmake fails in a whole bunch of places on Tiger.
This particular error is best fixed on Tiger by #defining __DARWIN_UNIX03
to get the newer definition in stdlib.h
, so it's an easy one to fix, viz this bit from stdlib.h
on Tiger:
#if __DARWIN_UNIX03 int unsetenv(const char *) __DARWIN_ALIAS(unsetenv); #else /* !__DARWIN_UNIX03 */ void unsetenv(const char *); #endif /* __DARWIN_UNIX03 */
Much harder are all the other things that need to be fixed. Upstream is totally uninterested.
So far, best I have been able to do is get an older version of libuv
to build with some modest modifications:
$ port -v installed libuv The following ports are currently installed: libuv @1.7.5_0 (active) platform='darwin 8' archs='ppc' date='2018-11-09T17:48:55-0800'
Anyone interested can get that in the TigerPorts repo at: <http://github.com/kencu/TigerPorts>.
That is not quite new enough for cmake to use it as a system-libuv
instead of it's internal libuv
, but it's getting close.
comment:5 follow-up: 6 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
Replying to kencu:
The libuv version in cmake fails in a whole bunch of places on Tiger.
This particular error is best fixed on Tiger by #defining
__DARWIN_UNIX03
to get the newer definition instdlib.h
, so it's an easy one to fix
Yes, true. Why isn't that in Portfile? It does not cure the problem, but it still guides to the next problem:
/opt/local/bin/gcc-mp-6 -pipe -Os -D__DARWIN_UNIX03 -m32 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Bootstrap.cmk -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Source -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Source/LexerParser -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities -DCMAKE_BOOTSTRAP -D_DARWIN_USE_64_BIT_INODE=1 -D_DARWIN_UNLIMITED_SELECT=1 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src -c /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix/fs.c -o uv-src-unix-fs.c.o /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix/fs.c:64:23: fatal error: copyfile.h: No such file or directory # include <copyfile.h> ^ compilation terminated. gmake: *** [Makefile:394: uv-src-unix-fs.c.o] Error 1 ---------------------------------------------
A version of copyfile.h
is /opt/local/var/macports/sources/lil.fr.rsync.macports.org/release/tarballs/ports/net/rsync-lart/files/copyfile.h
…
comment:6 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
Making copyfile.h
available leads to a new error, still in libuv, and still in the same file:
/opt/local/bin/gcc-mp-6 -pipe -Os -D__DARWIN_UNIX03 -m32 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Bootstrap.cmk -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Source -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Source/LexerParser -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities -DCMAKE_BOOTSTRAP -D_DARWIN_USE_64_BIT_INODE=1 -D_DARWIN_UNLIMITED_SELECT=1 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix -I/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src -c /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix/fs.c -o uv-src-unix-fs.c.o /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix/fs.c: In function 'uv__fs_scandir': /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix/fs.c:408:57: warning: passing argument 4 of 'scandir' from incompatible pointer type [-Wincompatible-pointer-types] n = scandir(req->path, &dents, uv__fs_scandir_filter, uv__fs_scandir_sort); ^~~~~~~~~~~~~~~~~~~ In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/include/uv-unix.h:28:0, from /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/include/uv.h:66, from /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix/fs.c:29: /usr/include/dirent.h:118:5: note: expected 'int (*)(const void *, const void *)' but argument is of type 'int (*)(uv__dirent_t **, uv__dirent_t **) {aka int (*)(struct dirent **, struct dirent **)}' int scandir(const char *, struct dirent ***, ^~~~~~~ /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix/fs.c: In function 'uv__fs_sendfile': /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix/fs.c:706:9: warning: implicit declaration of function 'sendfile' [-Wimplicit-function-declaration] r = sendfile(in_fd, out_fd, req->off, &len, NULL, 0); ^~~~~~~~ /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix/fs.c: In function 'uv__to_stat': /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix/fs.c:994:32: error: 'struct stat' has no member named 'st_birthtimespec'; did you mean 'st_atimespec'? dst->st_birthtim.tv_sec = src->st_birthtimespec.tv_sec; ^~ /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.12.4/Utilities/cmlibuv/src/unix/fs.c:995:33: error: 'struct stat' has no member named 'st_birthtimespec'; did you mean 'st_atimespec'? dst->st_birthtim.tv_nsec = src->st_birthtimespec.tv_nsec; ^~ gmake: *** [Makefile:394: uv-src-unix-fs.c.o] Error 1 ---------------------------------------------
comment:7 follow-up: 8 Changed 6 years ago by michaelld (Michael Dickens)
It seems like the issue here really is the same as that from #55415 ... and the way we generally handle dupolicates is to keep the prior one and close any more recent.
Thus, I'm going to upgrade the other ticket info && let's please take all future discussion there.
comment:8 Changed 6 years ago by ballapete (Peter "Pete" Dyballa)
comment:9 Changed 19 months ago by barracuda156
Replying to kencu:
The libuv version in cmake fails in a whole bunch of places on Tiger.
This particular error is best fixed on Tiger by #defining
__DARWIN_UNIX03
to get the newer definition instdlib.h
, so it's an easy one to fix, viz this bit fromstdlib.h
on Tiger:#if __DARWIN_UNIX03 int unsetenv(const char *) __DARWIN_ALIAS(unsetenv); #else /* !__DARWIN_UNIX03 */ void unsetenv(const char *); #endif /* __DARWIN_UNIX03 */
Does not seem to help, sadly. I got this pain now in R
on Tiger: https://trac.macports.org/ticket/67275
comment:10 Changed 19 months ago by kencu (Ken)
If __DARWIN_UNIX03
is defined, you get the new behaviour.
What exactly did you try? I don't see any log in your ticket.
Main.log from build on PowerPC 7447A