Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module-build-tiny-pm5XXX FTBS #1036

Open
nieder opened this issue Jun 26, 2023 · 3 comments
Open

module-build-tiny-pm5XXX FTBS #1036

nieder opened this issue Jun 26, 2023 · 3 comments
Assignees
Labels

Comments

@nieder
Copy link
Member

nieder commented Jun 26, 2023

On 10.14.5 with system-perl5184:

Module-Build-Tiny-0.046/lib/Module/Build/Tiny.pm
sudo -u fink-bld [ENV] sh -c /tmp/fink.d62MD
ARCHFLAGS="-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE" /usr/bin/arch -x86_64 perl5.18 Build.PL --install_base /sw --install_path bin=/sw/bin --install_path lib=/sw/lib/perl5/5.18.4 --install_path arch=/sw/lib/perl5/5.18.4/darwin-thread-multi-2level --install_path bindoc=/sw/share/man/man1 --install_path libdoc=/sw/share/man/man3 --install_path script=/sw/bin --destdir /sw/build.build/root-module-build-tiny-pm5184-0.046-1
Creating new 'Build' script for 'Module-Build-Tiny' version '0.046'
ARCHFLAGS="-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE" ./Build
cp lib/Module/Build/Tiny.pm blib/lib/Module/Build/Tiny.pm
sudo -u fink-bld [ENV] sh -c /tmp/fink.AElem
./Build test || exit 2
t/simple.t .. 1/? lib/Foo/Bar.xs:2:10: fatal error: 'EXTERN.h' file not found
#include "EXTERN.h"
         ^~~~~~~~~~
1 error generated.
error building temp/Bar.o from 'temp/Bar.c' at /sw/lib/perl5/ExtUtils/CBuilder/Base.pm line 115.
Can't locate loadable object for module Foo::Bar in @INC (@INC contains: /sw/build.build/module-build-tiny-pm5184-0.046-1/Module-Build-Tiny-0.046/5baaul2koq/Foo-Bar/blib/arch /sw/build.build/module-build-tiny-pm5184-0.046-1/Module-Build-Tiny-0.046/5baaul2koq/Foo-Bar/blib/lib t/lib /sw/build.build/module-build-tiny-pm5184-0.046-1/Module-Build-Tiny-0.046/blib/arch /sw/build.build/module-build-tiny-pm5184-0.046-1/Module-Build-Tiny-0.046/blib/lib /sw/lib/perl5/5.18.4/darwin-thread-multi-2level /sw/lib/perl5/5.18.4 /sw/lib/perl5/darwin-thread-multi-2level /sw/lib/perl5 /sw/lib/perl5/darwin /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.4 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at t/simple.t line 140.
# Tests were run but no plan was declared and done_testing() was not seen.
t/simple.t .. Dubious, test returned 2 (wstat 512, 0x200)
All 26 subtests passed 

If I edit PkgVersion.pm to include ARCHFLAGS in TestScript, then the tests pass:

 		} elsif ($type eq 'modulebuild' && !$self->param_boolean('NoPerlTests')) {
+			my ($perldirectory, $perlarchdir, $perlcmd) = $self->get_perl_dir_arch();
+			my $perlversion = substr($^V, 1, 4); # hack to extract '5.18'
+			my $archflags =
+				'ARCHFLAGS="-I' . Fink::Services::get_sdkpath() .
+				'/System/Library/Perl/' . $perlversion . '/darwin-thread-multi-2level/CORE"';
 			$default_script =
-				"./Build test || exit 2\n";
+				"$archflags ./Build test || exit 2\n";
 		}

Also, there's no module-build-tiny-pm-10.15.info

@dmacks
Copy link
Member

dmacks commented Jun 26, 2023

10.15 added (89385fb) thanks for catching the omission.

Does the previous package-version of module-build-tiny-pm5184 (prior to 89385fb) pass on 10.14.5? Your patch looks reasonable. Surprising we haven't hit that type of case before.

@nieder
Copy link
Member Author

nieder commented Jun 27, 2023

0.039 on 10.14.6 (pm5184) w/out patching PkgVersion:

./Build test || exit 2
t/00-compile.t .......... ok   
t/release-pod-syntax.t .. skipped: these tests are for release candidate testing
t/simple.t .............. 1/? lib/Simple.xs:2:10: fatal error: 'EXTERN.h' file not found
#include "EXTERN.h"

Patching PkgVersion to add ARCHFLAGS makes it work. However, isn't it problematic that the patch adding ARCHFLAGS (which I copied from the PatchScript and CompileScript chunks), is hardcoded to use the system-SDK for system-perl? When I tried building module-build-tiny-pm5282, ARCHFLAGS pointed to the perl5.18 SDK directory.

@dmacks
Copy link
Member

dmacks commented Jun 27, 2023

For now, it seems like this is only a bug in the test: using M::B::T would be in CompileScript, that already has ARCHFLAGS. So as a stop-gap I disabled the test (8f0d24) while we figure our the fink TestScript and general ARCHFLAGS situation. Leaving this issue open since it is a nice test-case and discussion of how to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants