Opened 4 years ago

Last modified 4 years ago

#59893 assigned defect

p5-wx: Compilation failed in require at Makefile.PL line 21.

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: p5-wx

Description

p5.28-wx doesn't build but it's unclear to me what the problem is:

Executing:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932" && /opt/local/bin/perl5.28 Makefile.PL installdirs=vendor 
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932" && /opt/local/bin/perl5.28 Makefile.PL installdirs=vendor 
Searching configuration for:
wxWidgets (any version) for (any toolkit); compiler compatibility: nc (any version); 

Available configurations:
wxWidgets 3.000004 for mac; compiler compatibility: gcc 3.4; options: no debug, unicode, no mslu
Compilation failed in require at Makefile.PL line 21.
BEGIN failed--compilation aborted at Makefile.PL line 21.
Command failed:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932" && /opt/local/bin/perl5.28 Makefile.PL installdirs=vendor 
Exit code: 2

Attachments (1)

p5.28-wx-fail-106.log (141.1 KB) - added by kencu (Ken) 4 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 4 years ago by kencu (Ken)

me too.

Changed 4 years ago by kencu (Ken)

Attachment: p5.28-wx-fail-106.log added

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

The buildbot log and Ken's log were both from Snow Leopard.

A similar report here on Lion: https://forums.wxwidgets.org/viewtopic.php?t=37987 (no solution, just advice to check the wx-perl mailing list, which the user says they did and found a similar report but didn't provide the URL)

Similar report here on Windows XP with mingw32: https://www.nntp.perl.org/group/perl.wxperl.users/2008/12/msg6321.html (solution was reinstall Windows XP)

Similar report here on El Capitan: https://stackoverflow.com/questions/37483020/install-wxperlsplashfast-or-any-wx-perl-modules-is-driving-me-insane-on-mac
A comment there finally provides a clue: "It is probably croaking when trying to invoke a compiler which doesn't exist." This makes me think this is another case of #59786 so we should fix that as proposed there.

comment:3 Changed 4 years ago by kencu (Ken)

If I manually go into the Wx build directory like this:

cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932

and then run the configure script as it appears to be currently run, it will generate the noted error:

$ CC=/opt/local/bin/clang-mp-9.0 CXX=/opt/local/bin/clang++-mp-9.0  /opt/local/bin/perl5.28 Makefile.PL installdirs=vendor
Searching configuration for:
wxWidgets (any version) for (any toolkit); compiler compatibility: nc (any version); 

Available configurations:
wxWidgets 3.000004 for mac; compiler compatibility: gcc 3.4; options: no debug, unicode, no mslu
Compilation failed in require at Makefile.PL line 21.
BEGIN failed--compilation aborted at Makefile.PL line 21.

However, if I run the configure script like this, the configuration will complete without any trouble:

/opt/local/bin/perl5.28 Makefile.PL installdirs=vendor
'WX' is not a known MakeMaker parameter name.
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Writing MYMETA.yml and MYMETA.json
Generating a Unix-style Makefile
Writing Makefile for Wx
Writing MYMETA.yml and MYMETA.json

======================================================================
For installation instructions and further help please see
docs/INSTALL.pod

For command line switches help use:
perl Makefile.PL --help
======================================================================

but later on the build will fail, because on 10.6.8 you run into flags being passed to the default compiler that is used, gcc-4.2:

Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932" && /usr/bin/make -j4 -w all 
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932'
"/opt/local/bin/perl5.28" script/make_v_cback.pl > cpp/v_cback_def.h
"/opt/local/bin/perl5.28" script/wxperl_overload cpp/ovl_const.cpp cpp/ovl_const.h overload.lst
Running Mkbootstrap for Wx ()
"/opt/local/bin/perl5.28" "/opt/local/lib/perl5/5.28/ExtUtils/xsubpp"  -nolinenumbers -noprototypes  -typemap '/opt/local/lib/perl5/5.28/ExtUtils/typemap' -typemap '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932/typemap'  Wx.xs > Wx.xsc
"/opt/local/bin/perl5.28" "/opt/local/lib/perl5/5.28/ExtUtils/xsubpp"  -nolinenumbers -noprototypes  -typemap '/opt/local/lib/perl5/5.28/ExtUtils/typemap' -typemap '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932/typemap'  Constant.xs > Constant.xsc
chmod 644 "Wx.bs"
"/opt/local/bin/perl5.28" -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/ItemContainer.xsp > XS/ItemContainer.xs
Writing 'cpp/ovl_const.h'.
Writing 'cpp/ovl_const.cpp'.
touch wxt_overload
"/opt/local/bin/perl5.28" -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/ItemContainerImmutable.xsp > XS/ItemContainerImmutable.xs
"/opt/local/bin/perl5.28" "/opt/local/lib/perl5/5.28/ExtUtils/xsubpp"  -nolinenumbers -noprototypes  -typemap '/opt/local/lib/perl5/5.28/ExtUtils/typemap' -typemap '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932/typemap'  Event.xs > Event.xsc
"/opt/local/bin/perl5.28" "/opt/local/lib/perl5/5.28/ExtUtils/xsubpp"  -nolinenumbers -noprototypes  -typemap '/opt/local/lib/perl5/5.28/ExtUtils/typemap' -typemap '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932/typemap'  Frames.xs > Frames.xsc
mv Constant.xsc Constant.c
"/opt/local/bin/perl5.28" "/opt/local/lib/perl5/5.28/ExtUtils/xsubpp"  -nolinenumbers -noprototypes  -typemap '/opt/local/lib/perl5/5.28/ExtUtils/typemap' -typemap '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932/typemap'  GDI.xs > GDI.xsc
mv Event.xsc Event.c
"/opt/local/bin/perl5.28" -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/VarHScrollHelper.xsp > XS/VarHScrollHelper.xs
"/opt/local/bin/perl5.28" -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/VarHVScrollHelper.xsp > XS/VarHVScrollHelper.xs
"/opt/local/bin/perl5.28" -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/VarScrollHelperBase.xsp > XS/VarScrollHelperBase.xs
"/opt/local/bin/perl5.28" -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp XS/VarVScrollHelper.xsp > XS/VarVScrollHelper.xs
cp script/wxperl_overload blib/script/wxperl_overload
"/opt/local/bin/perl5.28" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/wxperl_overload
"/opt/local/bin/perl5.28" script/copy_files.pl files.lst
cp cpp/compat.h blib/lib/Wx/cpp/compat.h
cp cpp/wxapi.h blib/lib/Wx/cpp/wxapi.h
cp cpp/e_cback.h blib/lib/Wx/cpp/e_cback.h
cp cpp/event.h blib/lib/Wx/cpp/event.h
cp cpp/constants.h blib/lib/Wx/cpp/constants.h
cp typemap blib/lib/Wx/typemap
cp cpp/helpers.h blib/lib/Wx/cpp/helpers.h
cp cpp/chkconfig.h blib/lib/Wx/cpp/chkconfig.h
cp cpp/v_cback_def.h blib/lib/Wx/cpp/v_cback_def.h
cp cpp/streams.h blib/lib/Wx/cpp/streams.h
cp cpp/v_cback.h blib/lib/Wx/cpp/v_cback.h
cp cpp/setup.h blib/lib/Wx/cpp/setup.h
cp Opt blib/arch/Wx/build/Opt.pm
cp cpp/overload.h blib/lib/Wx/cpp/overload.h
touch wxt_copy_files
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932/ext'
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932/ext/grid'
cp lib/Wx/Grid.pm ../../blib/lib/Wx/Grid.pm
Running Mkbootstrap for Grid ()
chmod 644 "Grid.bs"
"/opt/local/bin/perl5.28" "/opt/local/lib/perl5/5.28/ExtUtils/xsubpp"  -noprototypes -nolinenumbers  -typemap '/opt/local/lib/perl5/5.28/ExtUtils/typemap' -typemap '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932/ext/grid/../../typemap' -typemap '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932/ext/grid/typemap'  Grid.xs > Grid.xsc
mv GDI.xsc GDI.c
"/opt/local/bin/perl5.28" -MExtUtils::Command::MM -e 'cp_nonempty' -- Wx.bs blib/arch/auto/Wx/Wx.bs 644
/usr/bin/g++-4.2 -UWX_PRECOMP   -c  -I. -I. -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/wx/include/osx_cocoa-unicode-3.0 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0  -fno-common -DPERL_DARWIN -mmacosx-version-min=10.6 -pipe -Os -fno-strict-aliasing -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUTENV -O3   -DVERSION=\"0.9932\" -DXS_VERSION=\"0.9932\"  "-I/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE"  -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__   Constant.c
cc1plus: error: unrecognized command line option "-fstack-protector-strong"
make: *** [Constant.o] Error 1
make: *** Waiting for unfinished jobs....
mv Frames.xsc Frames.c
mv Grid.xsc Grid.c
/usr/bin/g++-4.2 -UWX_PRECOMP   -c -I. -I.. -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/wx/include/osx_cocoa-unicode-3.0 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0  -I. -I. -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/wx/include/osx_cocoa-unicode-3.0 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0   -I. -I../.. -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/wx/include/osx_cocoa-unicode-3.0 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0  -fno-common -DPERL_DARWIN -mmacosx-version-min=10.6 -pipe -Os -fno-strict-aliasing -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUTENV -O3   -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\"  "-I/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE" -DWXPL_EXT -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__   -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__    -DWXPL_EXT -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__   Grid.c
"/opt/local/bin/perl5.28" -MExtUtils::Command::MM -e 'cp_nonempty' -- Grid.bs ../../blib/arch/auto/Wx/Grid/Grid.bs 644
cc1plus: error: unrecognized command line option "-fstack-protector-strong"
make[2]: *** [Grid.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932/ext/grid'
make[1]: *** [subdirs] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932/ext'
make: *** [subdirs] Error 2
mv Wx.xsc Wx.c
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-wx/p5.28-wx/work/Wx-0.9932" && /usr/bin/make -j4 -w all 
Exit code: 2
Error: Failed to build p5.28-wx: command execution failed
Version 1, edited 4 years ago by kencu (Ken) (previous) (next) (diff)

comment:4 Changed 4 years ago by kencu (Ken)

Yuk -- after you generate the Makefiles, you can edit them one-by-one to change the compiler from g++-4.2 to clang++-mp-9.0, but there are many of them. Where is the g++-4.2 coming from?

At the top of a generated Makefile, it shows the wrong compiler being selected:

# This Makefile is for the Wx extension to perl.
#
# It was generated automatically by MakeMaker version
# 7.44 (Revision: 74400) from the contents of
# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
#
#       ANY CHANGES MADE HERE WILL BE LOST!
#
#   MakeMaker ARGV: (q[installdirs=vendor])
#

#   MakeMaker Parameters:

#     ABSTRACT_FROM => q[Wx.pm]
#     AUTHOR => [q[Mattia Barbon <mbarbon@cpan.org>]]
#     BUILD_REQUIRES => {  }
#     CCFLAGS => q[]
#     CONFIGURE => CODE(...)
#     CONFIGURE_REQUIRES => {  }
#     EXE_FILES => [q[script/wxperl_overload]]
#     LIBS => q[  -L/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib -lwx_osx_cocoau_adv-3.0 -lwx_osx_cocoau_core-3.0 -lwx_baseu-3.0  -L/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib -lwx_osx_cocoau_media-3.0 -lwx_osx_cocoau_core-3.0 -lwx_baseu-3.0  -L/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib -lwx_osx_cocoau_html-3.0 -lwx_osx_cocoau_core-3.0 -lwx_baseu-3.0]
#     LICENSE => q[perl]
#     META_ADD => { build_requires=>{ Alien::wxWidgets=>q[0.25], ExtUtils::MakeMaker=>q[6.48], ExtUtils::ParseXS=>q[3.15], ExtUtils::XSpp=>q[0.1602], File::Spec::Functions=>q[0.82], Test::Harness=>q[2.26], Test::More=>q[0.45], if=>q[0.03] }, configure_requires=>{ Alien::wxWidgets=>q[0.25] }, dynamic_config=>q[1], no_index=>{ directory=>[q[samples], q[script]], package=>[q[MY], q[Parse::Yapp::Driver], q[Wx::DropTarget], q[Wx::Droptarget]] }, requires=>{ Alien::wxWidgets=>q[0.25] }, resources=>{ MailingList=>q[http://lists.perl.org/list/wxperl-users.html], bugtracker=>q[http://rt.cpan.org/NoAuth/Bugs.html?Dist=Wx], homepage=>q[http://www.wxperl.it/], license=>q[http://dev.perl.org/licenses/], repository=>q[http://svn.code.sf.net/p/wxperl/code/wxPerl] } }
#     MIN_PERL_VERSION => q[5.006001]
#     NAME => q[Wx]
#     OBJECT => q[Wx.o Constant.o Controls.o Event.o Frames.o GDI.o Window.o ]
#     PMLIBDIRS => [q[lib], q[build]]
#     PREREQ_PM => { Alien::wxWidgets=>q[0.25], ExtUtils::MakeMaker=>q[6.46], ExtUtils::ParseXS=>q[3.15], ExtUtils::XSpp=>q[0.1602], File::Spec::Functions=>q[0.82], Test::Harness=>q[2.26], Test::More=>q[0.45], if=>q[0.03] }
#     TEST_REQUIRES => {  }
#     VERSION_FROM => q[Wx.pm]
#     XSOPT => q[ -nolinenumbers -noprototypes ]

#   MakeMaker 'CONFIGURE' Parameters:

#     ABSTRACT_FROM => q[Wx.pm]
#     AUTHOR => [q[Mattia Barbon <mbarbon@cpan.org>]]
#     BUILD_REQUIRES => {  }
#     CC => q[/usr/bin/g++-4.2 -UWX_PRECOMP  ]
#     CCFLAGS => q[]
#     CONFIGURE => CODE(...)
#     CONFIGURE_REQUIRES => {  }
#     DEFINE => q[-D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  ]
#     EXE_FILES => [q[script/wxperl_overload]]
#     INC => q[-I. -I. -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/wx/include/osx_cocoa-unicode-3.0 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0 ]
#     LD => q[/usr/bin/g++-4.2]
#     LIBS => q[  -L/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib -lwx_osx_cocoau_adv-3.0 -lwx_osx_cocoau_core-3.0 -lwx_baseu-3.0  -L/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib -lwx_osx_cocoau_media-3.0 -lwx_osx_cocoau_core-3.0 -lwx_baseu-3.0  -L/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib -lwx_osx_cocoau_html-3.0 -lwx_osx_cocoau_core-3.0 -lwx_baseu-3.0]
#     LICENSE => q[perl]
#     META_ADD => { build_requires=>{ Alien::wxWidgets=>q[0.25], ExtUtils::MakeMaker=>q[6.48], ExtUtils::ParseXS=>q[3.15], ExtUtils::XSpp=>q[0.1602], File::Spec::Functions=>q[0.82], Test::Harness=>q[2.26], Test::More=>q[0.45], if=>q[0.03] }, configure_requires=>{ Alien::wxWidgets=>q[0.25] }, dynamic_config=>q[1], no_index=>{ directory=>[q[samples], q[script]], package=>[q[MY], q[Parse::Yapp::Driver], q[Wx::DropTarget], q[Wx::Droptarget]] }, requires=>{ Alien::wxWidgets=>q[0.25] }, resources=>{ MailingList=>q[http://lists.perl.org/list/wxperl-users.html], bugtracker=>q[http://rt.cpan.org/NoAuth/Bugs.html?Dist=Wx], homepage=>q[http://www.wxperl.it/], license=>q[http://dev.perl.org/licenses/], repository=>q[http://svn.code.sf.net/p/wxperl/code/wxPerl] } }
#     MIN_PERL_VERSION => q[5.006001]
#     NAME => q[Wx]
#     OBJECT => q[Wx.o Constant.o Controls.o Event.o Frames.o GDI.o Window.o ]
#     PMLIBDIRS => [q[lib], q[build]]
#     PREREQ_PM => { Alien::wxWidgets=>q[0.25], ExtUtils::MakeMaker=>q[6.46], ExtUtils::ParseXS=>q[3.15], ExtUtils::XSpp=>q[0.1602], File::Spec::Functions=>q[0.82], Test::Harness=>q[2.26], Test::More=>q[0.45], if=>q[0.03] }
#     TEST_REQUIRES => {  }
#     VERSION_FROM => q[Wx.pm]
#     WX => { wx_core_lib=>undef, wx_core_lib_maybe=>undef, wx_overload=>{ header=>q[cpp/ovl_const.h], source=>q[cpp/ovl_const.cpp] }, wx_top=>q[Wx.pm] }
#     XSOPT => q[ -nolinenumbers -noprototypes ]
#     clean => { FILES=>q[cpp/ovl_const.cpp cpp/ovl_const.h Opt files.lst cpp/setup.h cpp/v_cback_def.h XS/ItemContainer.xs XS/ItemContainerImmutable.xs XS/VarScrollHelperBase.xs XS/VarVScrollHelper.xs XS/VarHScrollHelper.xs XS/VarHVScrollHelper.xs overload.lst xspp wxt_*] }
#     dynamic_lib => { OTHERLDFLAGS=>q[  -framework ApplicationServices ] }

# --- MakeMaker post_initialize section:

but the relevant PERL file that is supposed to have been used generating this Makefile looks like it has the right compiler in it:

/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/Config.pm
# tie returns the object, so the value returned to require will be true.
tie %Config, 'Config', {
    archlibexp => '/opt/local/lib/perl5/5.28/darwin-thread-multi-2level',
    archname => 'darwin-thread-multi-2level',
    cc => '/opt/local/bin/clang-mp-9.0',
    d_readlink => 'define',
    d_symlink => 'define',
    dlext => 'bundle',
    dlsrc => 'dl_dlopen.xs',
    dont_use_nlink => undef,
    exe_ext => '',
    inc_version_list => ' ',
    intsize => '4',
    ldlibpthname => 'DYLD_LIBRARY_PATH',
    libpth => '/opt/local/lib /opt/local/libexec/llvm-9.0/lib/clang/9.0.1/lib /usr/lib',
    osname => 'darwin',
    osvers => '10.8.0',
    path_sep => ':',
    privlibexp => '/opt/local/lib/perl5/5.28',
    scriptdir => '/opt/local/bin',
    sitearchexp => '/opt/local/lib/perl5/site_perl/5.28/darwin-thread-multi-2level',
    sitelibexp => '/opt/local/lib/perl5/site_perl/5.28',
    so => 'dylib',
    useithreads => 'define',
    usevendorprefix => 'define',
    version => '5.28.3',
};

comment:5 Changed 4 years ago by kencu (Ken)

possible, but the hack I did to accomplish it I am reluctant to share... :

$ port -v installed p5.28-wx
The following ports are currently installed:
  p5.28-wx @0.993.200_0 (active) platform='darwin 10' archs='x86_64' date='2020-06-19T09:21:21-0700'

Hack Alert

  1. run up to and including the patch phase of p5.28-wx
  2. run the config manually /opt/local/bin/perl5.28 Makefile.PL installdirs=vendor
  3. Edit the state file to tell MacPorts the configuration phase was done
  4. move /usr/bin/g++-4.2 to somewhere safe, and symlink clang++-mp-9.0 into it's place as g++-4.2
  5. install p5.28-Wx
  6. remove the clang++-mp-9.0 symlink, and put g++-4.2 back

Clearly, don't need anyone to point out that this is not a general solution for MacPorts.

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:6 in reply to:  4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to kencu:

If I manually go into the Wx build directory [...] and then run the configure script as it appears to be currently run, it will generate the noted error:

$ CC=/opt/local/bin/clang-mp-9.0 CXX=/opt/local/bin/clang++-mp-9.0  /opt/local/bin/perl5.28 Makefile.PL installdirs=vendor
Searching configuration for:
wxWidgets (any version) for (any toolkit); compiler compatibility: nc (any version); 

Available configurations:
wxWidgets 3.000004 for mac; compiler compatibility: gcc 3.4; options: no debug, unicode, no mslu
Compilation failed in require at Makefile.PL line 21.
BEGIN failed--compilation aborted at Makefile.PL line 21.

However, if I run the configure script like this, the configuration will complete without any trouble:

/opt/local/bin/perl5.28 Makefile.PL installdirs=vendor

Ok. Sounds like it's not #59786 then but rather that this configuration script is somehow incompatible with clang 9. Would be good if there were some way to see what error is being generated.

but later on the build will fail, because on 10.6.8 you run into flags being passed to the default compiler that is used, gcc-4.2, that it doesn't understand:

Replying to kencu:

Where is the g++-4.2 coming from?

My assumption is that when you ran the configuration process above without specifying CC and CXX it defaulted to using g++-4.2.

but the relevant PERL file that is supposed to have been used generating this Makefile looks like it has the right compiler in it:

/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/Config.pm
# tie returns the object, so the value returned to require will be true.
tie %Config, 'Config', {
    archlibexp => '/opt/local/lib/perl5/5.28/darwin-thread-multi-2level',
    archname => 'darwin-thread-multi-2level',
    cc => '/opt/local/bin/clang-mp-9.0',

I'm not totally familiar with how perl stuff builds but we've certainly run into situations before where it builds using the compiler perl was built with. It seems reasonable to think that the above would make it build with clang 9. But evidently not.

You could grep for /usr/bin/g++-4.2 in the p5-wx work directory (after you've run the configuration) and/or in the files installed by your perl ports and modules and see if you see anything relevant.

comment:7 Changed 4 years ago by kencu (Ken)

This is a very delicate port. On 10.13, it will only build with the default compiler. Trying to use clang-9.0 on 10.13 fails too, in a different way though.

These PERL ports seem to try to do a lot of figuring out of system version specifics and make assumptions about compilers, SDKs, etc. Makes them hard to tweak when things aren't working as expected.

Note: See TracTickets for help on using tickets.