Created attachment 503534 [details] build.log The Makefile in the acelib subdirectory imports platform-specific definitions from wmake/$(ACEDB_MACHINE)_DEF which on a Mac becomes wmake/DARWIN_DEF which does not exist. Looking at the other examples in the same directory, the file should contain, at a minimum: 1. The name of the configuration (should be "DARWIN" as it is later used for conditional compilation) 2. The c compiler command 3. The linker command 4. LIBS variable specifying any additional libraries to link to, such as "-lm" This bug is actually a feature-request to provide such a file. The necessary build failure info and a works-for-me solution are to be attached.
Created attachment 503536 [details] emerge --info '=dev-perl/Ace-1.290.0-r2::gentoo-prefix'
Created attachment 503538 [details] emerge -pqv '=dev-perl/Ace-1.290.0-r2::gentoo-prefix'
Created attachment 503540 [details, diff] The modification to Ace-1.920.0-r2.ebuild which works-for-me One way to create the DARWIN_DEF is from within src_prepare() This attached patch works-for-me, but maybe there is a more portable way to determine the compiler and linker.
I think if possible, use tc-getCC and tc-getLD from toolchain-funcs, or tc-export CC LD.
Created attachment 503660 [details, diff] Updated patch for Ace-1.920.0-r2.ebuild Thanks Fabian, Updated the patch to use tc-getCC and tc-getLD.
ok, two nits: 1. combine the two inherits (you can do 'inherit X Y') 2. -lm on Darwin is pointless, as it is a symlink to libSystem (aka libc) one question: where does the -fwritable-strings and the two defines come from, is that from the linux definitions or something?
Created attachment 506590 [details, diff] Updated (2) patch for Ace-1.920.0-r2.ebuild Combined the inherits, removed "LIBS=-lm" and "-DACEDB4", re-run "emerge -1 dev-perl/Ace", got no complaints. -fwritable-strings and -DACEDB4 both come from LINUX_4_DEF which I used as the starting point. Thinking about it, it was not smart to blindly copy "-DACEDB4", however "grep -r ACEDB4" from the root of the source directory only shows other _DEF files -- looks like this define is never checked. As for the -fwritable-strings, I'm assuming it's needed for something if it's there? -DPOSIX I added myself: without this flag the code is trying to forward-declare vsprintf and other standard functions which clashes with the respective macros in the standard headers.
With the patch, I can't get this compiled: RPC.xs:157:6: error: non-void function 'constant' should return a value [-Wreturn-type] return _ACECLIENT_; ^ 1 error generated. _ACECLIENT_ indeed is defined without a value, while the function should return a double. It's unclear to me how this is/was supposed to work.
(In reply to Fabian Groffen from comment #8) > With the patch, I can't get this compiled: > > RPC.xs:157:6: error: non-void function 'constant' should return a value > [-Wreturn-type] > return _ACECLIENT_; > ^ > 1 error generated. > > _ACECLIENT_ indeed is defined without a value, while the function should > return a double. It's unclear to me how this is/was supposed to work. Yes, I filed that separately as https://bugs.gentoo.org/637330 and upstream -- it looks like a separate, not Prefix-specific issue. I'm guessing older versions of C standard used to allow such void returns from non-void functions.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=960f0cdf44edbcd5ae2ca7f3e36d0f6ad1f54b00 commit 960f0cdf44edbcd5ae2ca7f3e36d0f6ad1f54b00 Author: Andreas K. Hüttel <dilfridge@gentoo.org> AuthorDate: 2018-03-30 19:12:32 +0000 Commit: Andreas K. Hüttel <dilfridge@gentoo.org> CommitDate: 2018-03-30 19:12:47 +0000 dev-perl/Ace: Various fixes for glibc-2.26 and Darwin Closes: https://bugs.gentoo.org/637114 Closes: https://bugs.gentoo.org/637102 Package-Manager: Portage-2.3.24, Repoman-2.3.6 dev-perl/Ace/Ace-1.920.0-r3.ebuild | 113 +++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7070a6dc14c2adb697e05dbe898da461729916b0 commit 7070a6dc14c2adb697e05dbe898da461729916b0 Author: Kent Fredric <kentnl@gentoo.org> AuthorDate: 2018-04-01 16:47:27 +0000 Commit: Kent Fredric <kentnl@gentoo.org> CommitDate: 2018-04-01 16:47:58 +0000 dev-perl/Ace: Fixes for bugs #637102 and #637330 - Use toolchain-funcs for Darwin support ( #637102 ) - Fix 'non-void function should return a value' ( #637330 ) - Migrate sed patches to git-am patches where possible Closes: https://bugs.gentoo.org/637330 Bug: https://bugs.gentoo.org/637102 Package-Manager: Portage-2.3.24, Repoman-2.3.6 dev-perl/Ace/Ace-1.920.0-r3.ebuild | 12 ++++++----- dev-perl/Ace/files/Ace-1.92-gcc-nonvoid.patch | 31 +++++++++++++++++++++++++++ dev-perl/Ace/files/Ace-1.92-glibc26.patch | 29 +++++++++++++++++++++++++ dev-perl/Ace/files/Ace-1.92-rpcxs.patch | 25 +++++++++++++++++++++ 4 files changed, 92 insertions(+), 5 deletions(-)}