Discussion:
[MacPorts] #54638: mesa-17.1.6_0 will not build mp 2.4.1, Mavericks
MacPorts
2017-08-18 19:29:46 UTC
Permalink
#54638: mesa-17.1.6_0 will not build mp 2.4.1, Mavericks
--------------------+-------------------
Reporter: tehcog | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Keywords: | Port: mesa
--------------------+-------------------
mesa-17.1.6_0 will not build mp 2.4.1, Mavericks

{{{
Aug 18 15:19:58 NerdCenter === Update MacPorts
Aug 18 15:19:58 NerdCenter ---> Updating MacPorts base sources using
rsync
Aug 18 15:20:03 NerdCenter MacPorts base version 2.4.1 installed,
Aug 18 15:20:03 NerdCenter MacPorts base version 2.4.1 downloaded.
Aug 18 15:20:03 NerdCenter ---> MacPorts base is already the latest
version
Aug 18 15:20:03 NerdCenter === Update Portfiles
Aug 18 15:20:03 NerdCenter ---> Updating the ports tree
Aug 18 15:20:10 NerdCenter
Aug 18 15:20:10 NerdCenter === List Outdated Ports
Aug 18 15:20:10 NerdCenter mesa
@12.0.1_2+osmesa+python27
Aug 18 15:20:10 NerdCenter
Aug 18 15:20:10 NerdCenter === Clean Outdated Ports
Aug 18 15:20:10 NerdCenter ---> Cleaning mesa
Aug 18 15:20:11 NerdCenter
Aug 18 15:20:11 NerdCenter === Fetch Outdated Ports
Aug 18 15:20:11 NerdCenter ---> Fetching distfiles for mesa
Aug 18 15:20:11 NerdCenter
Aug 18 15:20:11 NerdCenter === Upgrade Outdated Ports (port -p upgrade
--enforce-variants outdated)
Aug 18 15:20:14 NerdCenter ---> Computing dependencies for mesa
Aug 18 15:20:14 NerdCenter ---> Fetching archive for mesa
Aug 18 15:20:17 NerdCenter ---> Attempting to fetch
mesa-17.1.6_0+osmesa+python27.darwin_13.x86_64.tbz2 from
https://packages.macports.org/mesa
Aug 18 15:20:17 NerdCenter ---> Attempting to fetch
mesa-17.1.6_0+osmesa+python27.darwin_13.x86_64.tbz2 from
http://lil.fr.packages.macports.org/mesa
Aug 18 15:20:18 NerdCenter ---> Attempting to fetch
mesa-17.1.6_0+osmesa+python27.darwin_13.x86_64.tbz2 from
http://mse.uk.packages.macports.org/sites/packages.macports.org/mesa
Aug 18 15:20:19 NerdCenter ---> Verifying checksums for mesa
Aug 18 15:20:19 NerdCenter ---> Extracting mesa
Aug 18 15:20:20 NerdCenter ---> Applying patches to mesa
Aug 18 15:20:20 NerdCenter ---> Configuring mesa
Aug 18 15:21:10 NerdCenter ---> Building mesa
Aug 18 15:21:16 NerdCenter Error: Failed to build mesa: command execution
failed
Aug 18 15:21:16 NerdCenter Error: See
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_mesa/mesa/main.log
for details.
Aug 18 15:21:16 NerdCenter Error: Follow
https://guide.macports.org/#project.tickets to report a bug.
Aug 18 15:21:16 NerdCenter
Aug 18 15:21:16 NerdCenter === List Inactive Duplicate Ports
Aug 18 15:21:17 NerdCenter
Aug 18 15:21:17 NerdCenter === Uninstall Inactive Duplicate Ports
Aug 18 15:21:17 NerdCenter Error: No ports matched the given expression
Aug 18 15:21:17 NerdCenter
Aug 18 15:21:17 NerdCenter === Upgrade Done
}}}

--
Ticket URL: <https://trac.macports.org/ticket/54638>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2017-08-18 19:30:19 UTC
Permalink
#54638: mesa-17.1.6_0 will not build mp 2.4.1, Mavericks
---------------------+-------------------
Reporter: tehcog | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords:
Port: mesa |
---------------------+-------------------
Changes (by tehcog):

* Attachment "main.log" added.

main.log

--
Ticket URL: <https://trac.macports.org/ticket/54638>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2017-08-18 19:34:28 UTC
Permalink
#54638: mesa-17.1.6_0 will not build mp 2.4.1, Mavericks
---------------------+-------------------
Reporter: tehcog | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords:
Port: mesa |
---------------------+-------------------

Comment (by tehcog):

Possible duplicate (see 54637)

--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2017-08-18 20:43:33 UTC
Permalink
#54638: mesa-17.1.6_0 will not build mp 2.4.1, Mavericks
---------------------+-------------------
Reporter: tehcog | Owner:
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords:
Port: mesa |
---------------------+-------------------

Comment (by kencu):

No, it looks like a different error:
{{{
:info:build disk_cache.c:465:11: error: implicit declaration of function
'fstatat' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
628 :info:build if (fstatat(dirfd(dir), entry->d_name, &sb, 0)
== 0) {
629 :info:build ^
630 :info:build 1 warning and 1 error generated.
}}}

--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2017-08-19 11:48:35 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------
Changes (by ryandesign):

* keywords: => tiger leopard snowleopard lion mountainlion mavericks
* owner: => jeremyhu
* status: new => assigned


Comment:

According to `man fstatat` on Sierra, "The `fstatat()` system call
appeared in OS X 10.10". So mesa will not build on earlier systems right
now.

--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2017-08-20 15:28:09 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------

Comment (by kencu):

<https://opensource.apple.com/source/gnutar/gnutar-453/gnutar/lib/fstatat.c.auto.html>

--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2017-08-20 15:58:04 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------

Comment (by Marcus Calhoun-Lopez <marcuscalhounlopez@…>):

In [changeset:"ec7db4f8f3638a645c96b5498ef21245a63630fe/macports-ports"
ec7db4f8f3638a645c96b5498ef21245a63630fe/macports-ports]:
{{{
#!ConfigurableCommitTicketReference repository="macports-ports"
revision="ec7db4f8f3638a645c96b5498ef21245a63630fe"
mesa: disable functionality to build on old systems

No revbump since port either builds correctly or not at all.
See https://trac.macports.org/ticket/54638
See https://trac.macports.org/ticket/54643
}}}

--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2017-08-20 17:43:39 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------

Comment (by jeremyhu):

fstatat requires kernel support for proper functionality.

I wrote userland versions of them a few years ago and can use those
without GPL taint.

Leaving this open as a reminder to fix that and revert the disabled code.

--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2017-08-27 18:19:52 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------

Comment (by mojca):

It looks like we need to rebuild `wine-devel` at least. I can do that once
I confirm that it works on one worker.

--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-18 01:50:49 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------

Comment (by kencu):

This a ping for Jeremy - If you still have those userland versions of
`fstatat` etc and might pop them up into your github repo perhaps, I'd be
happy to see if I can get them rolled into the `macports-legacy` portgroup
and fix a few of these hangers-on.
--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:12>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-21 00:09:56 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------
Changes (by jeremyhu):

* Attachment "atcalls.c" added.

atcalls.c
--
Ticket URL: <https://trac.macports.org/ticket/54638>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-21 00:10:05 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------

Comment (by jeremyhu):

See attached.
--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:13>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-21 00:13:02 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------
Changes (by jeremyhu):

* Attachment "atcalls.c" added.

atcalls.c
--
Ticket URL: <https://trac.macports.org/ticket/54638>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-21 00:14:03 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------
Changes (by jeremyhu):

* Attachment "atcalls.c" added.

atcalls.c
--
Ticket URL: <https://trac.macports.org/ticket/54638>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-21 01:53:40 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------

Comment (by kencu):

That is great - thank you. I'll work with Chris if needed and get these
rolled in to the legacy PG.
--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:14>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-21 02:28:20 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------

Comment (by kencu):

OK. This compiles without any particular issue. You need these added to
`<sys/fcntl.h>`, possibly without the initial guard, but probably with the
guard:
{{{
#if __DARWIN_C_LEVEL >= 200809L
/*
* Descriptor value for the current working directory
*/
#define AT_FDCWD -2

/*
* Flags for the at functions
*/
#define AT_EACCESS 0x0010 /* Use effective ids in access
check */
#define AT_SYMLINK_NOFOLLOW 0x0020 /* Act on the symlink itself not
the target */
#define AT_SYMLINK_FOLLOW 0x0040 /* Act on target of symlink */
#define AT_REMOVEDIR 0x0080 /* Path refers to directory */
#endif
}}}

you need to add a definition for `getattrlistat` to avoid an implicit
declaration error:
{{{
int getattrlistat(int dirfd, const char *pathname, struct attrlist *a,
void *buf, size_t size, unsigned long
flags);
}}}
and there is some secret sauce, info for which is found here
<https://gist.github.com/bnoordhuis/4221344>
{{{
/* this is some apple internal magic */

#include <sys/syscall.h>

#ifndef SYS___pthread_chdir
# define SYS___pthread_chdir 348
#endif

#ifndef SYS___pthread_fchdir
# define SYS___pthread_fchdir 349
#endif

int __pthread_chdir(const char *path)
{
return syscall(SYS___pthread_chdir, path);
}

int __pthread_fchdir(int dirfd)
{
return syscall(SYS___pthread_fchdir, dirfd);
}

/* extern int __pthread_fchdir(int fd); */

}}}

and then it compiles through to an object file without any troubles, at
least on this 10.6.8 system I like to use, with clang-3.9 and libc++.

Perhaps Chris can help me come up with some test programs for it.
--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:15>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-21 07:53:52 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------

Comment (by kencu):

OK, it's done, at least to the point of testing. If anyone is interested,
the new version that includes the *at functions is here:

<https://github.com/kencu/macports-legacy-support>

once we see if it fills the need and I didn't make any silly errors, we'll
bump it to master.
--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:16>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-21 08:54:37 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------

Comment (by kencu):

seems to work:
{{{
util-linux @2.33_0 (active) platform='darwin 10' archs='x86_64'
date='2018-11-21T00:35:40-0800'
}}}
now for some kind of way to really test it.
--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:17>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-21 20:18:07 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------
Post by MacPorts
now for some kind of way to really test it.
I have Mavericks, perhaps I can help. Just tell me what to do.

Regards
--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:18>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-21 21:00:02 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------

Comment (by kencu):

I think I will set up a `-devel` option for the legacy-support port, so
that people can more easily test these things out.
--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:19>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-22 03:36:53 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------

Comment (by kencu):

ok, it's done. If you install
{{{
sudo port -v install legacy-support-devel +universal
}}}
you should then be able to work with ports that need `fstatat` and pretty
much all the other *at functions.

You'll need to add
{{{
PortGroup legacysupport 1.0
}}}
to the Portfile you want to work with, if it isn't there already.

Please help me fix up any errors you may come across.
--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:20>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-22 03:39:09 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------

Comment (by kencu):

My only real remaining question is Tiger -- I think the syscalls used in
the *at function replacements use a kernel call that Tiger doesn't
support, based on looking at the headers.

Appreciate any way around this anyone knows about.
--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:21>
MacPorts <https://www.macports.org/>
Ports system for macOS
MacPorts
2018-11-26 08:21:01 UTC
Permalink
#54638: mesa @17.1.6_0: error: implicit declaration of function 'fstatat' is
invalid in C99
-------------------------+-------------------------------------------------
Reporter: tehcog | Owner: jeremyhu
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.4.1
Resolution: | Keywords: tiger leopard snowleopard lion
Port: mesa | mountainlion mavericks
-------------------------+-------------------------------------------------

Comment (by jeremyhu):

__DARWIN_C_LEVEL gets setup by sys/cdefs.h. Older systems predate that.
I think I added it in Lion, and the POSIX2008 support may have been later
(Mountain Lion?). If you want to use the POSIX 2008 namespace guards,
you'll also need to update sys/cdefs.h in your overlay.
--
Ticket URL: <https://trac.macports.org/ticket/54638#comment:22>
MacPorts <https://www.macports.org/>
Ports system for macOS
Loading...