[MacPorts] #29050: groff universal variant fails
#29050: groff universal variant fails -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: universal | Port: groff -------------------------------------+-------------------------------------- groff 1.21's universal variant fails: {{{ gcc-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags }}} groff 1.20.1's universal variant did not have this problem. -- Ticket URL: <https://trac.macports.org/ticket/29050> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29050: groff universal variant fails -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: universal | Port: groff -------------------------------------+-------------------------------------- Comment(by dports@…): Looks like it's trying to do dependency tracking (gcc -M) and can't with multiple arch flags. I feel like we must have dealt with this before, but the only references I can find are to automake programs that support --disable-dependency-tracking, which this does not. -- Ticket URL: <https://trac.macports.org/ticket/29050#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29050: groff universal variant fails -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: universal | Port: groff -------------------------------------+-------------------------------------- Comment(by ryandesign@…): I'm not familiar enough with gcc to know what "gcc -M" is about and whether there is an alternative we could use. One could compare the 0.20.1 source with the 0.21 source to see what changes were made that caused this, and if they can be reversed. Or we could see if using the muniversal portgroup is a viable option for groff. -- Ticket URL: <https://trac.macports.org/ticket/29050#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29050: groff universal variant fails -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: universal | Port: groff -------------------------------------+-------------------------------------- Comment(by dports@…): I just tried muniversal, actually. It failed with: {{{ Error: Target org.macports.destroot returned: /opt/local/share/doc/groff-1.21/pdf/pdfmark.pdf differs in /opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_sysutils_groff/work/destroot-i386 and /opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_trunk_dports_sysutils_groff/work /destroot-x86_64 and cannot be merged }}} I wonder if the pdf files differ only because they are compressed, in which case we should decompress them and rerun the comparison, as we do for .gz files (although I don't know if there's a way to easily decompress a pdf without pulling in esoteric dependencies). Or it's possible they just legitimately differ. (Of course, if there were a solution that didn't require muniversal that would obviously be preferable.) -- Ticket URL: <https://trac.macports.org/ticket/29050#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29050: groff universal variant fails -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: universal | Port: groff -------------------------------------+-------------------------------------- Comment(by dtakahashi42@…): The origin of this problem seems to be a supplemental call of {{{configure}}} at {{{src/libs/gnulib}}}, which was introduced at 1.21. See {{{Makefile.in:770}}}, {{{ $(GNULIBDIRS): FORCE ... test -f Makefile || $(SHELL) $$srcdir/configure ; \ <-- here $(MAKE) ACLOCAL=: AUTOCONF=: AUTOHEADER=: AUTOMAKE=: $(do) ;; \ esac }}} a supplemental configure script is called without any options, therefore, it ignores {{{--disable-dependency-tracking}}}, {{{--prefix}}} and so on. I think the evaluation of this configure script (with appropriate options) at {{{post-configure}}} phase will solve the problem. -- Ticket URL: <https://trac.macports.org/ticket/29050#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29050: groff universal variant fails -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: universal | Port: groff -------------------------------------+-------------------------------------- Changes (by ryandesign@…): * cc: siavashsf@… (added) Comment: Has duplicate #29066. -- Ticket URL: <https://trac.macports.org/ticket/29050#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29050: groff universal variant fails -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: universal | Port: groff -------------------------------------+-------------------------------------- Comment(by rmstonecipher@…): dtakahashi,[[br]] Some of the commands in your patch are not yet documented in the [http://guide.macports.org/ MacPorts Guide].[[br]] Could you explain what your patch does?[[br]][[br]] This could also be resolved by adding configure.cflags or configure.universal_cflags to Makefile.in using a patchfile and a post- patch reinplace.[[br]] {{{ Index: files/patch-Makefile.in.diff =================================================================== --- files/patch-Makefile.in.diff (revision 0) +++ files/patch-Makefile.in.diff (revision 0) @@ -0,0 +1,11 @@ +--- Makefile.in.orig 2011-04-09 23:21:32.000000000 -0500 ++++ Makefile.in 2011-04-09 23:22:27.000000000 -0500 +@@ -767,7 +767,7 @@ + case $(do) in \ + all) \ + cd $@; \ +- test -f Makefile || $(SHELL) $$srcdir/configure ; \ ++ test -f Makefile || $(SHELL) $$srcdir/configure %%CONFIGURE_ARGS%%; \ + $(MAKE) ACLOCAL=: AUTOCONF=: AUTOHEADER=: AUTOMAKE=: $(do) ;; \ + esac + Index: Portfile =================================================================== --- Portfile (revision 77708) +++ Portfile (working copy) @@ -15,10 +15,20 @@ master_sites gnu checksums sha1 a513aca4a7530a6e63325addd6ba2d282c8f1608 \ rmd160 d050f886291a53ea46875887e5641e510e1aecf6 +depends_build port:psutils configure.args --infodir=${prefix}/share/info \ --mandir=${prefix}/share/man \ --without-x +patchfiles patch-Makefile.in.diff +post-patch { + if {[variant_isset universal]} { + reinplace "s|%%CONFIGURE_ARGS%%|${configure.universal_args}|g" ${worksrcpath}/Makefile.in + } else { + reinplace "s|%%CONFIGURE_ARGS%%|${configure.args}|g" ${worksrcpath}/Makefile.in + } +} + post-destroot { delete ${destroot}${prefix}/lib/charset.alias } }}} dtakahashi's way is more terse.[[br]] Does it matter which solution is used?[[br]][[br]] Ryan Stonecipher[[br]] P.S. The other change in my Portfile diff, adding 'depends_build port:psutils', allows the documentation to build html per a configure-time warning. -- Ticket URL: <https://trac.macports.org/ticket/29050#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29050: groff universal variant fails -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: universal | Port: groff -------------------------------------+-------------------------------------- Comment(by ryandesign@…): His patch says: run the configure phase with the settings set in the portfile, then run the configure phase again in a different directory. Ryan, you're right this is not a command listed in the guide or approved for use in portfiles. I am of course also guilty of using this in the php5extension portgroup, and a similar method in the php5 portfile, but I'd rather not proliferate its use if at all possible. Does this second configure script really need all the arguments passed to the main one? Does it for example matter whether --prefix is passed to it? If not, and if the only thing we're concerned with is disabling dependency tracking, then just write a simple one-line patch that unconditionally adds that flag to that configure script invocation; there's no harm in disabling dependency tracking even when not building universal. Dependency tracking is only relevant when a build directory is reused, which in MacPorts it never is; it's cleaned after every successful build. -- Ticket URL: <https://trac.macports.org/ticket/29050#comment:13> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29050: groff universal variant fails -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: universal | Port: groff -------------------------------------+-------------------------------------- Comment(by ryandesign@…): In fact, Ryan, if your intention with your patch was to pass all the usual args to that second configure script, you haven't succeeded. In the universal case, you're not passing configure.args, and in neither case are you passing configure.pre_args. -- Ticket URL: <https://trac.macports.org/ticket/29050#comment:14> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29050: groff universal variant fails -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: universal | Port: groff -------------------------------------+-------------------------------------- Comment(by dtakahashi42@…): Thank you for the better fix. As you pointed, {{{portconfigure::configure_main}}} is not documented (but it is exported to global namespace from {{{${prefix}/share/macports/Tcl/port1.0/portconfigure.tcl}}}), so I should not have used it... In my observation, {{{Makefile}}} at {{{src/libs/gnulib}}} does not install anything, but just build {{{libgnu.a}}} that is statically linked to main binaries. So passing all the configure options is not needed, and I agree to add a small patch that unconditionally disables dependency tracking. -- Ticket URL: <https://trac.macports.org/ticket/29050#comment:16> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29050: groff universal variant fails -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: universal | Port: groff -------------------------------------+-------------------------------------- Comment(by mcalhoun@…): Attached is another possible solution. -- Ticket URL: <https://trac.macports.org/ticket/29050#comment:18> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29050: groff universal variant fails -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: universal | Port: groff -------------------------------------+-------------------------------------- Comment(by ryandesign@…): Yes, but we were trying to avoid the muniversal variant if possible. -- Ticket URL: <https://trac.macports.org/ticket/29050#comment:19> MacPorts <http://www.macports.org/> Ports system for Mac OS
#29050: groff universal variant fails --------------------------------------+------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: fixed | Keywords: universal Port: groff | --------------------------------------+------------------------------------- Changes (by ryandesign@…): * status: new => closed * resolution: => fixed Comment: Replying to [comment:16 dtakahashi42@…]:
So passing all the configure options is not needed, and I agree to add a small patch that unconditionally disables dependency tracking.
Seems to work. r77723 -- Ticket URL: <https://trac.macports.org/ticket/29050#comment:20> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts