Opened 4 months ago

Last modified 3 months ago

#69245 new defect

p5.34-xml-parser: Expat must be installed prior to building XML::Parser and I can't find it

Reported by: ballapete (Peter "Pete" Dyballa) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.9.0
Keywords: tiger ppc Cc:
Port: p5.34-xml-parser

Description

Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/XML-Parser-2.47" && /opt/local/bin/perl5.34 Makefile.PL INSTALLDIRS=vendor CC="/opt/local/bin/gcc-apple-4.2" LD="/opt/local/bin/gcc-apple-4.2" EXPATLIBPATH=/opt/local/lib EXPATINCPATH=/opt/local/include 
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/XML-Parser-2.47" && /opt/local/bin/perl5.34 Makefile.PL INSTALLDIRS=vendor CC="/opt/local/bin/gcc-apple-4.2" LD="/opt/local/bin/gcc-apple-4.2" EXPATLIBPATH=/opt/local/lib EXPATINCPATH=/opt/local/include 

Expat must be installed prior to building XML::Parser and I can't find
it in the standard library directories. Install 'expat-devel' (or
'libexpat1-dev') package with your OS package manager. See 'README'.

Or you can download expat from:

http://sourceforge.net/projects/expat/

If expat is installed, but in a non-standard directory, then use the
following options to Makefile.PL:

    EXPATLIBPATH=...  To set the directory in which to find libexpat

    EXPATINCPATH=...  To set the directory in which to find expat.h

For example:

    perl Makefile.PL EXPATLIBPATH=/home/me/lib EXPATINCPATH=/home/me/include

Note that if you build against a shareable library in a non-standard location
you may (on some platforms) also have to set your LD_LIBRARY_PATH environment
variable at run time for perl to find the library.

DEBUG: Executing proc-post-org.macports.configure-configure-0
DEBUG: Executing portconfigure::configure_finish
DEBUG: Privilege de-escalation not attempted as not running as root.
DEBUG: build phase started at Tue Jan 30 23:45:03 CET 2024
--->  Building p5.34-xml-parser
DEBUG: Executing org.macports.build (p5.34-xml-parser)
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
DEVELOPER_DIR='/Developer'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.4'
Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/XML-Parser-2.47" && /usr/bin/make -w all 
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/XML-Parser-2.47" && /usr/bin/make -w all 
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/XML-Parser-2.47'
make: *** No rule to make target `all'.  Stop.
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/XML-Parser-2.47'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/XML-Parser-2.47" && /usr/bin/make -w all 
Exit code: 2
Error: Failed to build p5.34-xml-parser: command execution failed
DEBUG: Error code: CHILDSTATUS 7105 2
DEBUG: Backtrace: command execution failed

Nevertheless, the missing port is installed:

  expat @2.5.0_0 (active) requested_variants='' platform='darwin 8' archs='ppc' date='2022-11-13T20:46:37+0100'

and the required files exist as well:

-rw-r--r--   1 root  admin   43535 13 Nov  2022 /opt/local/include/expat.h
-rwxr-xr-x   1 root  admin  204072 13 Nov  2022 /opt/local/lib/libexpat.1.8.10.dylib
lrwxr-xr-x   1 root  admin      21 13 Nov  2022 /opt/local/lib/libexpat.1.dylib -> libexpat.1.8.10.dylib
-rw-r--r--   1 root  admin  409088 13 Nov  2022 /opt/local/lib/libexpat.a
lrwxr-xr-x   1 root  admin      21 13 Nov  2022 /opt/local/lib/libexpat.dylib -> libexpat.1.8.10.dylib

Invoking the build command on the command line I get:

/opt/local/bin/perl5.34 Makefile.PL INSTALLDIRS=vendor CC="/opt/local/bin/gcc-apple-4.2" LD="/opt/local/bin/gcc-apple-4.2" EXPATLIBPATH=/opt/local/lib EXPATINCPATH=/opt/local/include
Use of uninitialized value $line in substitution (s///) at /opt/local/lib/perl5/vendor_perl/5.34/Text/ParseWords.pm line 21.
Use of uninitialized value $compiler in -f at inc/Devel/CheckLib.pm line 487.
Use of uninitialized value in subroutine entry at inc/Devel/CheckLib.pm line 470.
Use of uninitialized value in subroutine entry at inc/Devel/CheckLib.pm line 470.
Use of uninitialized value in subroutine entry at inc/Devel/CheckLib.pm line 470.
Use of uninitialized value in subroutine entry at inc/Devel/CheckLib.pm line 470.
Use of uninitialized value in subroutine entry at inc/Devel/CheckLib.pm line 470.
Use of uninitialized value in subroutine entry at inc/Devel/CheckLib.pm line 470.
Use of uninitialized value in subroutine entry at inc/Devel/CheckLib.pm line 470.
Use of uninitialized value in subroutine entry at inc/Devel/CheckLib.pm line 470.
Use of uninitialized value in subroutine entry at inc/Devel/CheckLib.pm line 470.
Use of uninitialized value in subroutine entry at inc/Devel/CheckLib.pm line 470.
Use of uninitialized value in subroutine entry at inc/Devel/CheckLib.pm line 470.
Use of uninitialized value in subroutine entry at inc/Devel/CheckLib.pm line 470.
Use of uninitialized value in subroutine entry at inc/Devel/CheckLib.pm line 470.
Couldn't find your C compiler.
Compilation failed in require at Makefile.PL line 4.
BEGIN failed--compilation aborted at Makefile.PL line 4.

Attachments (1)

main.log (115.2 KB) - added by ballapete (Peter "Pete" Dyballa) 3 months ago.
Main.log from debug/trace session on PPC Tiger, Mac OS X 10.4.11

Download all attachments as: .zip

Change History (13)

comment:1 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)

Summary: p5.34-xml-parser depends on expat and port does know this?p5.34-xml-parser: Expat must be installed prior to building XML::Parser and I can't find it

comment:2 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)

Does the build create any type of config.log file? If so, attach it. Without that, it's difficult to know why it couldn't find expat when it's there.

Let me begin with the obvious question: does /opt/local/bin/gcc-apple-4.2 exist and work?

comment:3 in reply to:  2 Changed 4 months ago by ballapete (Peter "Pete" Dyballa)

Replying to ryandesign:

Does the build create any type of config.log file?

I only looked for that file, did not use find, and did not see it…

Let me begin with the obvious question: does /opt/local/bin/gcc-apple-4.2 exist and work?

Yes. Both is true. Right now, and one or two days on, it is upgrading GCC7.

comment:4 Changed 4 months ago by ballapete (Peter "Pete" Dyballa)

The build is now at stage 2 in ppc-apple-darwin8/libstdc++-v3.

Last edited 3 months ago by ballapete (Peter "Pete" Dyballa) (previous) (diff)

comment:5 Changed 4 months ago by ballapete (Peter "Pete" Dyballa)

No file config.log is created. I think it would be created when the make command would find the target ‘all’… So presumingly Tiger's make 3.80 is a bit too old (gmake is 4.4.1). I tried to port -vd upgrade p5.34-xml-parser MAKE=gmake but this failed…

comment:6 Changed 3 months ago by ballapete (Peter "Pete" Dyballa)

After some days I found that port -vsd build p5.34-xml-parser build.cmd=gmake would substitute make with gmake – and it worked:

Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/XML-Parser-2.47" && gmake -w all 
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/XML-Parser-2.47" && gmake -w all 
gmake: Entering directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/XML-Parser-2.47'
gmake: *** No rule to make target 'all'.  Stop.
gmake: Leaving directory '/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/XML-Parser-2.47'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/XML-Parser-2.47" && gmake -w all 
Exit code: 2
Error: Failed to build p5.34-xml-parser: command execution failed

But still no config.log file…

comment:7 Changed 3 months ago by ballapete (Peter "Pete" Dyballa)

On Sonoma 14.2.1 after port -vsd build p5.34-xml-parser the following command

find /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser -type f -name "*.log" -ls

finishes without any output.This port seems to be debug proof…

Last edited 3 months ago by ballapete (Peter "Pete" Dyballa) (previous) (diff)

comment:8 in reply to:  6 ; Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to ballapete:

Invoking the build command on the command line I get:

/opt/local/bin/perl5.34 Makefile.PL INSTALLDIRS=vendor CC="/opt/local/bin/gcc-apple-4.2" LD="/opt/local/bin/gcc-apple-4.2" EXPATLIBPATH=/opt/local/lib EXPATINCPATH=/opt/local/include
Use of uninitialized value $line in substitution (s///) at /opt/local/lib/perl5/vendor_perl/5.34/Text/ParseWords.pm line 21.

Right, running a command yourself on the command line is not the same as MacPorts running it when you omit a lot of the things MacPorts did. In this case, the most relevant omission is that you did not set the CC environment variable which is what Makefile.PL is passing to ParseWords. Since that environment variable wasn't set, the value that ParseWords sees is uninitialized, and the rest of the script fails. (You are setting CC as a command line argument but that's not the same as an environment variable.)

Replying to ballapete:

So presumingly Tiger's make 3.80 is a bit too old (gmake is 4.4.1). I tried to port -vd upgrade p5.34-xml-parser MAKE=gmake but this failed…

Sure, that won't work. MacPorts doesn't automatically take arguments that you pass to the port command and pass them as arguments or environment variables to the build phase.

Replying to ballapete:

After some days I found that port -vsd build p5.34-xml-parser build.cmd=gmake would substitute make with gmake – and it worked:

Yes, you can specify MacPorts Portfile options like build.cmd on the command line to override the defaults, for debugging purposes. But the problem here isn't that a Makefile was generated that is incompatible with your version of make. The problem is that no Makefile was generated at all due to the failure to find expat.

This bug looks like #64543 again, which was fixed by using the compiler specified in the CC environment variable. Previously it would have used whatever compiler perl had been built with, and the problem with that was that the compiler that had been used to build perl on, for example, Snow Leopard, was a newer MacPorts version of clang which was not necessarily installed anymore at the time that a perl module was being built.

We really need to see what's happening in Makefile.PL as it runs, and since it doesn't generate a config.log for us, maybe we'll have to do ourselves. I added the p5-devel-dumptrace port which provides a module for printing information about each line of a perl script as it's executed. Wait at least an hour from now and then run:

sudo port clean p5.34-xml-parser
sudo port sync
sudo port install --unrequested p5.34-devel-dumptrace
sudo port configure p5.34-xml-parser configure.pre_args='-d:DumpTrace Makefile.PL'

When this fails, please attach the main.log file so that we can inspect the output. There will be a lot of output so attaching the main.log is better than pasting its contents into a comment.

comment:9 Changed 3 months ago by ballapete (Peter "Pete" Dyballa)

My test and answer will come in one or two weeks, because now I am upgrading ports on Leopard. But here the same failure could happen…

comment:10 Changed 3 months ago by ballapete (Peter "Pete" Dyballa)

On PPC Leopard, Mac OS X 10.5.6, it installs/upgrades without problem.

comment:11 in reply to:  8 Changed 3 months ago by ballapete (Peter "Pete" Dyballa)

Replying to ryandesign:

Replying to ballapete:

sudo port clean p5.34-xml-parser
sudo port sync
sudo port install --unrequested p5.34-devel-dumptrace
sudo port configure p5.34-xml-parser configure.pre_args='-d:DumpTrace Makefile.PL'

On Leopard py-bootstrap-modules is defective so that no Python 3.11 module can be built (meson, py311-meson, py311-markupsafe) and many ports cannot be built without meson and support does not seem to exist, so I am back at Tiger. The first three commands succeeded, the last one failed, as usual:

Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/XML-Parser-2.47" && /opt/local/bin/perl5.34 -d:DumpTrace Makefile.PL INSTALLDIRS=vendor CC="/opt/local/bin/gcc-apple-4.2" LD="/opt/local/bin/gcc-apple-4.2" EXPATLIBPATH=/opt/local/lib EXPATINCPATH=/opt/local/include 
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/XML-Parser-2.47" && /opt/local/bin/perl5.34 -d:DumpTrace Makefile.PL INSTALLDIRS=vendor CC="/opt/local/bin/gcc-apple-4.2" LD="/opt/local/bin/gcc-apple-4.2" EXPATLIBPATH=/opt/local/lib EXPATINCPATH=/opt/local/include 
Can't locate Devel/DumpTrace.pm in @INC (you may need to install the Devel::DumpTrace module) (@INC contains: /opt/local/lib/perl5/site_perl/5.34/darwin-thread-multi-2level /opt/local/lib/perl5/site_perl/5.34 /opt/local/lib/perl5/vendor_perl/5.34/darwin-thread-multi-2level /opt/local/lib/perl5/vendor_perl/5.34 /opt/local/lib/perl5/5.34/darwin-thread-multi-2level /opt/local/lib/perl5/5.34).
BEGIN failed--compilation aborted.
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/XML-Parser-2.47" && /opt/local/bin/perl5.34 -d:DumpTrace Makefile.PL INSTALLDIRS=vendor CC="/opt/local/bin/gcc-apple-4.2" LD="/opt/local/bin/gcc-apple-4.2" EXPATLIBPATH=/opt/local/lib EXPATINCPATH=/opt/local/include 
Exit code: 2

Changed 3 months ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from debug/trace session on PPC Tiger, Mac OS X 10.4.11

comment:12 Changed 3 months ago by ballapete (Peter "Pete" Dyballa)

The command find /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser -type f -print0 | xargs -0 gls -lotr --time-style=iso returned these two files that were created during configure phase:

-rw-r--r-- 1 macports  18781 03-05 22:29 /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/XML-Parser-2.47/inc/Devel/CheckLib.pm
-rw-r--r-- 1 macports    199 03-05 22:29 /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5-xml-parser/p5.34-xml-parser/work/.macports.p5.34-xml-parser.state
Note: See TracTickets for help on using tickets.