perl5-dbi / dbi

DBI - The Perl 5 Database Interface
Other
81 stars 58 forks source link

Make gcc version check with clang not misleading #111

Closed dveeden closed 10 months ago

dveeden commented 10 months ago

On FreeBSD 14.0 perl is build with Clang 16.0.6 and not with GCC

This leads to this config:

% perl -e 'use Config; print "cc=$Config{\"cc\"}\ngccversion=$Config{\"gccversion\"}\n"'
cc=cc
gccversion=FreeBSD Clang 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)

And from the perl Makefile.PL output:

WARNING: Your GNU C FreeBSD Clang 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152) compiler is very old. Please upgrade it and rebuild perl.
Your perl was compiled with gcc (version FreeBSD Clang 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)), okay.

Unfortunately we can't simply check $Config{'cc'} as that simply says cc and not clang or something that identifies the compiler.

Not sure what options we should set in $opts{DEFINE} for Clang. I've tried to make the current version build without warnings.

dveeden commented 10 months ago

Full output:

dveeden@nas:~/dev/dbi % uname -r
14.0-RELEASE
dveeden@nas:~/dev/dbi % cc --version
FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152)
Target: x86_64-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
dveeden@nas:~/dev/dbi % perl -v

This is perl 5, version 36, subversion 1 (v5.36.1) built for amd64-freebsd-thread-multi

Copyright 1987-2023, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at https://www.perl.org/, the Perl Home Page.

dveeden@nas:~/dev/dbi % perl Makefile.PL 

*** Your LANG environment variable is set to 'en_US.UTF-8'
*** This may cause problems for some perl installations.
*** If you get test failures, please try again with LANG unset.
*** If that then works, please email dbi-dev@perl.org with details
*** including the output of 'perl -V'

Your perl was compiled with Clang (version 16.0.6). As this is not GCC, version checking is skipped.
Creating test wrappers for DBD::Gofer:
t/zvg_01basics.t 
t/zvg_02dbidrv.t 
t/zvg_03handle.t 
t/zvg_04mods.t 
t/zvg_05concathash.t 
t/zvg_06attrs.t 
t/zvg_07kids.t 
t/zvg_08keeperr.t 
t/zvg_09trace.t 
t/zvg_10examp.t 
t/zvg_11fetch.t 
t/zvg_12quote.t 
t/zvg_13taint.t 
t/zvg_14utf8.t 
t/zvg_15array.t 
t/zvg_16destroy.t 
t/zvg_17handle_error.t 
t/zvg_19fhtrace.t 
t/zvg_20meta.t 
t/zvg_30subclass.t 
t/zvg_31methcache.t 
t/zvg_35thrclone.t (use threads)
t/zvg_40profile.t 
t/zvg_41prof_dump.t 
t/zvg_42prof_data.t 
t/zvg_43prof_env.t 
t/zvg_48dbi_dbd_sqlengine.t 
t/zvg_49dbd_file.t 
t/zvg_50dbm_simple.t 
t/zvg_51dbm_file.t 
t/zvg_52dbm_complex.t 
t/zvg_53sqlengine_adv.t 
t/zvg_54_dbd_mem.t 
t/zvg_60preparse.t 
t/zvg_65transact.t 
t/zvg_70callbacks.t 
t/zvg_72childhandles.t 
t/zvg_73cachedkids.t 
t/zvg_80proxy.t 
t/zvg_85gofer.t 
t/zvg_86gofer_fail.t 
t/zvg_87gofer_cache.t 
t/zvg_90sql_type_cast.t 
t/zvg_91_store_warning.t 
Creating test wrappers for DBI::SQL::Nano:
t/zvn_48dbi_dbd_sqlengine.t 
t/zvn_49dbd_file.t 
t/zvn_50dbm_simple.t 
t/zvn_51dbm_file.t 
t/zvn_52dbm_complex.t 
t/zvn_85gofer.t 
Creating test wrappers for DBI::PurePerl:
t/zvp_01basics.t 
t/zvp_02dbidrv.t 
t/zvp_03handle.t 
t/zvp_04mods.t 
t/zvp_05concathash.t 
t/zvp_06attrs.t 
t/zvp_07kids.t 
t/zvp_08keeperr.t 
t/zvp_09trace.t 
t/zvp_10examp.t 
t/zvp_11fetch.t 
t/zvp_12quote.t 
t/zvp_13taint.t 
t/zvp_14utf8.t 
t/zvp_15array.t 
t/zvp_16destroy.t 
t/zvp_17handle_error.t 
t/zvp_19fhtrace.t 
t/zvp_20meta.t 
t/zvp_30subclass.t 
t/zvp_31methcache.t 
t/zvp_35thrclone.t (use threads)
t/zvp_40profile.t 
t/zvp_41prof_dump.t 
t/zvp_42prof_data.t 
t/zvp_43prof_env.t 
t/zvp_48dbi_dbd_sqlengine.t 
t/zvp_49dbd_file.t 
t/zvp_50dbm_simple.t 
t/zvp_51dbm_file.t 
t/zvp_52dbm_complex.t 
t/zvp_53sqlengine_adv.t 
t/zvp_54_dbd_mem.t 
t/zvp_60preparse.t 
t/zvp_65transact.t 
t/zvp_70callbacks.t 
t/zvp_72childhandles.t 
t/zvp_73cachedkids.t 
t/zvp_80proxy.t 
t/zvp_85gofer.t 
t/zvp_86gofer_fail.t 
t/zvp_87gofer_cache.t 
t/zvp_90sql_type_cast.t 
t/zvp_91_store_warning.t 
Creating test wrappers for DBD::Gofer + DBI::SQL::Nano:
t/zvxgn_48dbi_dbd_sqlengine.t 
t/zvxgn_49dbd_file.t 
t/zvxgn_50dbm_simple.t 
t/zvxgn_51dbm_file.t 
t/zvxgn_52dbm_complex.t 
t/zvxgn_85gofer.t 
Creating test wrappers for DBD::Gofer + DBI::PurePerl:
t/zvxgp_01basics.t 
t/zvxgp_02dbidrv.t 
t/zvxgp_03handle.t 
t/zvxgp_04mods.t 
t/zvxgp_05concathash.t 
t/zvxgp_06attrs.t 
t/zvxgp_07kids.t 
t/zvxgp_08keeperr.t 
t/zvxgp_09trace.t 
t/zvxgp_10examp.t 
t/zvxgp_11fetch.t 
t/zvxgp_12quote.t 
t/zvxgp_13taint.t 
t/zvxgp_14utf8.t 
t/zvxgp_15array.t 
t/zvxgp_16destroy.t 
t/zvxgp_17handle_error.t 
t/zvxgp_19fhtrace.t 
t/zvxgp_20meta.t 
t/zvxgp_30subclass.t 
t/zvxgp_31methcache.t 
t/zvxgp_35thrclone.t (use threads)
t/zvxgp_40profile.t 
t/zvxgp_41prof_dump.t 
t/zvxgp_42prof_data.t 
t/zvxgp_43prof_env.t 
t/zvxgp_48dbi_dbd_sqlengine.t 
t/zvxgp_49dbd_file.t 
t/zvxgp_50dbm_simple.t 
t/zvxgp_51dbm_file.t 
t/zvxgp_52dbm_complex.t 
t/zvxgp_53sqlengine_adv.t 
t/zvxgp_54_dbd_mem.t 
t/zvxgp_60preparse.t 
t/zvxgp_65transact.t 
t/zvxgp_70callbacks.t 
t/zvxgp_72childhandles.t 
t/zvxgp_73cachedkids.t 
t/zvxgp_80proxy.t 
t/zvxgp_85gofer.t 
t/zvxgp_86gofer_fail.t 
t/zvxgp_87gofer_cache.t 
t/zvxgp_90sql_type_cast.t 
t/zvxgp_91_store_warning.t 
Creating test wrappers for DBI::SQL::Nano + DBI::PurePerl:
t/zvxnp_48dbi_dbd_sqlengine.t 
t/zvxnp_49dbd_file.t 
t/zvxnp_50dbm_simple.t 
t/zvxnp_51dbm_file.t 
t/zvxnp_52dbm_complex.t 
t/zvxnp_85gofer.t 
Creating test wrappers for DBD::Gofer + DBI::SQL::Nano + DBI::PurePerl:
t/zvxgnp_48dbi_dbd_sqlengine.t 
t/zvxgnp_49dbd_file.t 
t/zvxgnp_50dbm_simple.t 
t/zvxgnp_51dbm_file.t 
t/zvxgnp_52dbm_complex.t 
t/zvxgnp_85gofer.t 
Checking if your kit is complete...
Looks good

    I see you're using perl 5.036001 on amd64-freebsd-thread-multi, okay.
    Remember to actually *read* the README file!
    Use  'make' to build the software (dmake or nmake on Windows).
    Then 'make test' to execute self tests.
    Then 'make install' to install the DBI and then delete this working
    directory before unpacking and building any DBD::* drivers.

Generating a Unix-style Makefile
Writing Makefile for DBI
Writing MYMETA.yml and MYMETA.json
dveeden@nas:~/dev/dbi % make
"/usr/local/bin/perl" -MExtUtils::Command -e 'mkpath' -- blib/lib/DBI
rm -f blib/lib/DBI/Changes.pm
cp Changes blib/lib/DBI/Changes.pm
cp DBIXS.h blib/arch/auto/DBI/DBIXS.h
cp lib/Bundle/DBI.pm blib/lib/Bundle/DBI.pm
cp lib/DBI/Gofer/Request.pm blib/lib/DBI/Gofer/Request.pm
cp lib/DBI/Gofer/Transport/Base.pm blib/lib/DBI/Gofer/Transport/Base.pm
cp dbi_sql.h blib/arch/auto/DBI/dbi_sql.h
cp lib/DBI/Const/GetInfoReturn.pm blib/lib/DBI/Const/GetInfoReturn.pm
cp lib/DBI/Util/_accessor.pm blib/lib/DBI/Util/_accessor.pm
cp dbivport.h blib/arch/auto/DBI/dbivport.h
cp lib/DBI/W32ODBC.pm blib/lib/DBI/W32ODBC.pm
cp lib/DBD/Gofer/Policy/classic.pm blib/lib/DBD/Gofer/Policy/classic.pm
cp dbipport.h blib/arch/auto/DBI/dbipport.h
cp lib/DBD/NullP.pm blib/lib/DBD/NullP.pm
cp lib/DBI/DBD/Metadata.pm blib/lib/DBI/DBD/Metadata.pm
cp lib/DBI/Gofer/Response.pm blib/lib/DBI/Gofer/Response.pm
cp lib/DBI/Util/CacheMemory.pm blib/lib/DBI/Util/CacheMemory.pm
cp lib/DBD/File.pm blib/lib/DBD/File.pm
cp lib/DBD/Sponge.pm blib/lib/DBD/Sponge.pm
cp Driver_xst.h blib/arch/auto/DBI/Driver_xst.h
cp lib/DBD/Gofer/Transport/corostream.pm blib/lib/DBD/Gofer/Transport/corostream.pm
cp lib/DBI/Gofer/Serializer/Storable.pm blib/lib/DBI/Gofer/Serializer/Storable.pm
cp lib/DBI/DBD.pm blib/lib/DBI/DBD.pm
cp lib/DBI/Profile.pm blib/lib/DBI/Profile.pm
cp lib/DBD/File/HowTo.pod blib/lib/DBD/File/HowTo.pod
cp lib/DBI/Const/GetInfo/ODBC.pm blib/lib/DBI/Const/GetInfo/ODBC.pm
cp dbixs_rev.pl blib/lib/dbixs_rev.pl
cp lib/DBI/SQL/Nano.pm blib/lib/DBI/SQL/Nano.pm
cp lib/DBI/Const/GetInfo/ANSI.pm blib/lib/DBI/Const/GetInfo/ANSI.pm
cp lib/DBI/Gofer/Execute.pm blib/lib/DBI/Gofer/Execute.pm
cp lib/Win32/DBIODBC.pm blib/lib/Win32/DBIODBC.pm
cp Driver.xst blib/arch/auto/DBI/Driver.xst
cp lib/DBD/Gofer/Transport/stream.pm blib/lib/DBD/Gofer/Transport/stream.pm
cp lib/DBI/DBD/SqlEngine/Developers.pod blib/lib/DBI/DBD/SqlEngine/Developers.pod
cp lib/DBI/ProfileSubs.pm blib/lib/DBI/ProfileSubs.pm
cp lib/DBD/Mem.pm blib/lib/DBD/Mem.pm
cp lib/DBD/Gofer/Transport/null.pm blib/lib/DBD/Gofer/Transport/null.pm
cp lib/DBD/Proxy.pm blib/lib/DBD/Proxy.pm
cp lib/DBD/Multiplex/Logic/Default.pm blib/lib/DBD/Multiplex/Logic/Default.pm
cp lib/DBI/PurePerl.pm blib/lib/DBI/PurePerl.pm
cp lib/DBD/File/Roadmap.pod blib/lib/DBD/File/Roadmap.pod
cp lib/DBI/Gofer/Serializer/DataDumper.pm blib/lib/DBI/Gofer/Serializer/DataDumper.pm
cp lib/DBI/Const/GetInfoType.pm blib/lib/DBI/Const/GetInfoType.pm
cp lib/DBD/Multiplex.pm blib/lib/DBD/Multiplex.pm
cp lib/DBI/DBD/SqlEngine/HowTo.pod blib/lib/DBI/DBD/SqlEngine/HowTo.pod
cp lib/DBI/ProfileDumper.pm blib/lib/DBI/ProfileDumper.pm
cp dumpmethods.pl blib/lib/dumpmethods.pl
cp lib/DBD/Gofer/Transport/Base.pm blib/lib/DBD/Gofer/Transport/Base.pm
cp lib/DBI/Gofer/Serializer/Base.pm blib/lib/DBI/Gofer/Serializer/Base.pm
cp lib/DBI/ProxyServer.pm blib/lib/DBI/ProxyServer.pm
cp lib/DBD/File/Developers.pod blib/lib/DBD/File/Developers.pod
cp lib/DBI/Gofer/Transport/pipeone.pm blib/lib/DBI/Gofer/Transport/pipeone.pm
cp goferperf.pl blib/lib/goferperf.pl
cp lib/DBD/ExampleP.pm blib/lib/DBD/ExampleP.pm
cp lib/DBI/Gofer/Transport/stream.pm blib/lib/DBI/Gofer/Transport/stream.pm
cp DBI.pm blib/lib/DBI.pm
cp lib/DBD/Gofer/Policy/Base.pm blib/lib/DBD/Gofer/Policy/Base.pm
cp dbd_xsh.h blib/arch/auto/DBI/dbd_xsh.h
cp lib/DBD/DBM.pm blib/lib/DBD/DBM.pm
cp lib/DBD/Gofer.pm blib/lib/DBD/Gofer.pm
cp lib/DBD/Gofer/Transport/pipeone.pm blib/lib/DBD/Gofer/Transport/pipeone.pm
cp lib/DBI/ProfileData.pm blib/lib/DBI/ProfileData.pm
cp lib/DBD/Gofer/Policy/pedantic.pm blib/lib/DBD/Gofer/Policy/pedantic.pm
cp lib/DBI/ProfileDumper/Apache.pm blib/lib/DBI/ProfileDumper/Apache.pm
cp lib/DBI/DBD/SqlEngine.pm blib/lib/DBI/DBD/SqlEngine.pm
cp lib/DBD/Gofer/Policy/rush.pm blib/lib/DBD/Gofer/Policy/rush.pm
cp dbixs_rev.h blib/arch/auto/DBI/dbixs_rev.h
Running Mkbootstrap for DBI ()
chmod 644 "DBI.bs"
"/usr/local/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- DBI.bs blib/arch/auto/DBI/DBI.bs 644
"/usr/local/bin/perl" -p -e "s/~DRIVER~/Perl/g" ./Driver.xst > Perl.xsi
"/usr/local/bin/perl" "/usr/local/lib/perl5/5.36/ExtUtils/xsubpp"  -typemap '/usr/local/lib/perl5/5.36/ExtUtils/typemap' -typemap '/usr/home/dveeden/dev/dbi/typemap'  Perl.xs > Perl.xsc
mv Perl.xsc Perl.c
cc -c    -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DUSE_THREAD_SAFE_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing    -DVERSION=\"1.644\"  -DXS_VERSION=\"1.644\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.36/mach/CORE"  -W -Wall -Wpointer-arith -Wbad-function-cast -Wno-comment -Wno-sign-compare -Wno-cast-qual -Wmissing-noreturn -Wno-unused-parameter -Wno-compound-token-split-by-macro -Wno-constant-conversion -Wno-implicit-const-int-float-conversion Perl.c
"/usr/local/bin/perl" "/usr/local/lib/perl5/5.36/ExtUtils/xsubpp"  -typemap '/usr/local/lib/perl5/5.36/ExtUtils/typemap' -typemap '/usr/home/dveeden/dev/dbi/typemap'  DBI.xs > DBI.xsc
mv DBI.xsc DBI.c
cc -c    -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DUSE_THREAD_SAFE_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing    -DVERSION=\"1.644\"  -DXS_VERSION=\"1.644\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.36/mach/CORE"  -W -Wall -Wpointer-arith -Wbad-function-cast -Wno-comment -Wno-sign-compare -Wno-cast-qual -Wmissing-noreturn -Wno-unused-parameter -Wno-compound-token-split-by-macro -Wno-constant-conversion -Wno-implicit-const-int-float-conversion DBI.c
rm -f blib/arch/auto/DBI/DBI.so
cc  -shared  -L/usr/local/lib/perl5/5.36/mach/CORE -lperl -L/usr/local/lib -fstack-protector-strong  DBI.o  -o blib/arch/auto/DBI/DBI.so        
chmod 755 blib/arch/auto/DBI/DBI.so
"/usr/local/bin/perl" "-Iblib/arch" "-Iblib/lib" dbilogstrip.PL dbilogstrip
Extracted dbilogstrip from dbilogstrip.PL with variable substitutions.
"/usr/local/bin/perl" "-Iblib/arch" "-Iblib/lib" dbiprof.PL dbiprof
Extracted dbiprof from dbiprof.PL with variable substitutions.
dbiprof syntax OK
"/usr/local/bin/perl" "-Iblib/arch" "-Iblib/lib" dbiproxy.PL dbiproxy
Extracted dbiproxy from dbiproxy.PL with variable substitutions.
dbiproxy syntax OK
cp dbilogstrip blib/script/dbilogstrip
"/usr/local/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/dbilogstrip
cp dbiprof blib/script/dbiprof
"/usr/local/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/dbiprof
cp dbiproxy blib/script/dbiproxy
"/usr/local/bin/perl" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/dbiproxy
Manifying 3 pod documents
Manifying 50 pod documents
dveeden@nas:~/dev/dbi %