RJVB / macstrop

RJVB's repository of alternative macports, with ports missing from or overriding those in the standard collection, including a set of KF5 ports.
21 stars 9 forks source link

kf5-kio fails to build with /opt/local/include/sys/acl.h error #27

Closed gitdevmod closed 5 years ago

gitdevmod commented 5 years ago

See log file main.log Similar issue with qt5-webkit

RJVB commented 5 years ago

See log file main.log Similar issue with qt5-webkit

:info:build /opt/local/include/sys/acl.h:78:1: error: unknown type name 'EXPORT'
:info:build EXPORT acl_t acl_init(int count);

I've already tried to fix that but never had feedback on the fix. When did you install port:acl? I cannot reproduce this problem myself, for me the acl.h header file gets corrected (= the post-destroot fix is redundant).

Before I try other things, could you do a

> port clean acl
> port -n destroot acl

(with whatever options you like added) and attach the full log please?

In parallel you could try to do a search/replace in /opt/local/include/sys/acl.h, replacing all EXPORT with extern, and confirm if indeed that fixes the kf5-kio build (just port -n build kf5-kio should be enough, the build should continue from where it errored).

gitdevmod commented 5 years ago

$ sudo port -n destroot acl ---> Computing dependencies for acl ---> Fetching distfiles for acl ---> Verifying checksums for acl ---> Extracting acl ---> Applying patches to acl ---> Configuring acl ---> Building acl ---> Staging acl into destroot Warning: reinplace s|<EXPORT>|extern|g didn't change anything in /opt/local/var/macports/build/_opt_local_macstrop_sysutils_acl/acl/work/destroot/opt/local/include/sys/acl.h Warning: reinplace s|<EXPORT>|extern|g didn't change anything in /opt/local/var/macports/build/_opt_local_macstrop_sysutils_acl/acl/work/destroot/opt/local/include/acl/libacl.h

gitdevmod commented 5 years ago

It's build correctly after replace

gitdevmod commented 5 years ago

See log file main.log Similar issue with qt5-webkit :info:build /opt/local/include/sys/acl.h:78:1: error: unknown type name 'EXPORT' :info:build EXPORT acl_t acl_init(int count); I've already tried to fix that but never had feedback on the fix. When did you install port:acl?

I really do not know

RJVB commented 5 years ago

It's build correctly after replace

You mean that EXPORT been replaced with extern everywhere? The reinplace log message you copied is a bit suspect, shows there's an issue with special character escaping. I should have realised that :-/

But the fact that nothing is being reinplaced also shows that the other part of the tentative fix, using gmake, is enough in and by itself, apparently.

gitdevmod commented 5 years ago

It's build correctly after replace You mean that EXPORT been replaced with extern everywhere? The reinplace log message you copied is a bit suspect, shows there's an issue with special character escaping. I should have realised that :-/

Yes, after manual replace in vi :-)

RJVB commented 5 years ago

OK, I pushed a revbump for what I take as a confirmed fix :)

gitdevmod commented 5 years ago

After updating sysutils/acl EXPORT is not replaced by extern

$ sudo port upgrade outdated Portfile changed since last build; discarding previous state. ---> Computing dependencies for acl ---> Fetching distfiles for acl ---> Verifying checksums for acl ---> Extracting acl ---> Applying patches to acl ---> Configuring acl ---> Building acl ---> Staging acl into destroot Warning: reinplace s|\<EXPORT\>|extern|g didn't change anything in /opt/local/var/macports/build/_opt_local_macstrop_sysutils_acl/acl/work/destroot/opt/local/include/sys/acl.h Warning: reinplace s|\<EXPORT\>|extern|g didn't change anything in /opt/local/var/macports/build/_opt_local_macstrop_sysutils_acl/acl/work/destroot/opt/local/include/acl/libacl.h ---> Installing acl @2.5.53_1 ---> Cleaning acl ---> Computing dependencies for acl ---> Deactivating acl @2.5.53_0 ---> Cleaning acl ---> Activating acl @2.5.53_1 ---> Cleaning acl

RJVB commented 5 years ago

Warning: reinplace s|\<EXPORT>|extern|g didn't change anything in /opt/local/var/macports/build/_opt_local_macstrop_sysutils_acl/acl/work/destroot/opt/local/include/sys/acl.h Warning: reinplace s|\<EXPORT>|extern|g didn't change anything in /opt/local/var/macports/build/_opt_local_macstrop_sysutils_acl/acl/work/destroot/opt/local/include/acl/libacl.h

AAaAARRGHH!

I mean, you ARE saying that the installed acl.h file still has EXPORT in it?

Could I ask you to tinker with the reinplace statement until it works, since I cannot seem to reproduce the issue myself? There's a handy script somewhere in my ports tree which allows you to do (don't forget the -o!):

> sudo port -nok destroot acl
# tinker tinker
> port-redo-install-phase -destroot acl
> sudo port -nok destroot acl
# etc
gitdevmod commented 5 years ago

Maybe I do not really understand the reinplace command but in https://github.com/RJVB/acl/blob/master/include/acl.h and https://github.com/RJVB/acl/blob/master/include/libacl.h there is no '\<EXPORT>' only 'EXPORT' ?

RJVB commented 5 years ago

The regexp syntax used here (for sed, the underlying command that does the work) means "replace the whole word EXPORT".

The argument seems to work for me when used via my commandline version of the reinplace command (and a copy of acl.h in which all extern keywords have been replaced by EXPORT)

> reinplace.tcl -v 's|\<EXPORT\>|extern|g' acl.h

R.

gitdevmod commented 5 years ago

@RJVB How to use reinplace.tcl ? It fails with

$ /opt/local/macstrop/macports/bin/reinplace.tcl -v 's|\<EXPORT>|extern|g' /opt/local/include/acl/libacl.h can't read "os_subplatform": no such variable while executing "subst {$os_subplatform}" invoked from within "set os.subplatform [subst {$os_subplatform}]" ("uplevel" body line 1) invoked from within "uplevel #0 [list set $optionName] [subst -nocommands {[subst {$option_defaults($optionName)}]}]" (procedure "default_check" line 10) invoked from within "default_check os.subplatform {} r" (read trace on "os.subplatform") invoked from within "set $option" (procedure "option" line 10) invoked from within "option os.subplatform" invoked from within "if {[option os.platform] eq "darwin" && [option os.subplatform] eq "macosx"} {

we're on Mac OS X and can therefore build universal

default o..."
(file "/opt/local/libexec/macports/lib/port1.0/portmain.tcl" line 140)
invoked from within

"source /opt/local/libexec/macports/lib/port1.0/portmain.tcl" ("package ifneeded portmain 1.0" script) invoked from within "package require portmain 1.0" (file "/opt/local/libexec/macports/lib/port1.0/port.tcl" line 66) invoked from within "source /opt/local/libexec/macports/lib/port1.0/port.tcl" ("package ifneeded port 1.0" script) invoked from within "package require port 1.0" (file "/opt/local/macstrop/macports/bin/reinplace.tcl" line 32)

RJVB commented 5 years ago

@RJVB How to use reinplace.tcl ?

Like you did...

It fails with can't read "os_subplatform": no such variable

I hadn't tested it on Mac; apparently the variable gets defined in my Linux version of MacPorts, but not on Mac. Fixed now.

But I've given up :-/ There's no reason to use a more complex reinplace pattern to get it to apply only to entire words EXPORT; the pattern doesn't occur anywhere in the headers except where it has to be replaced. I didn't revbump port:acl though...

Tatsh commented 5 years ago

Is this still relevant? I have kf5-kio installed now and never had an issue like this.

RJVB commented 5 years ago

Hmm, thanks. I usually leave it up to the reporter to close issues I couldn't reproduce myself, when they confirm that they're fixed. Guess that's now confirmed. :)