Giter Club home page Giter Club logo

conf-libconfig's People

Contributors

artiom-m avatar cnangel avatar cpanservice avatar dangogh avatar daxim avatar raforg avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

conf-libconfig's Issues

tests fails with libconfig 1.7.3

>>> perl-conf-libconfig: Building testing/perl-conf-libconfig 0.100-r6 (using abuild 3.8.0_rc4-r0) started Wed, 28 Jul 2021 15:37:10 +0000
>>> perl-conf-libconfig: Checking sanity of /home/ncopa/aports/testing/perl-conf-libconfig/APKBUILD...
>>> perl-conf-libconfig: Analyzing dependencies...
>>> perl-conf-libconfig: Installing for build: build-base perl perl-dev libconfig-dev perl-test-deep perl-test-exception perl-extutils-pkgconfig perl-test-warn
(1/1) Upgrading .makedepends-perl-conf-libconfig (20210728.153643 -> 20210728.153713)
OK: 490 MiB in 179 packages
>>> perl-conf-libconfig: Cleaning up srcdir
>>> perl-conf-libconfig: Cleaning up pkgdir
>>> perl-conf-libconfig: Fetching https://cpan.metacpan.org/authors/id/C/CN/CNANGEL/Conf-Libconfig-0.100.tar.gz
>>> perl-conf-libconfig: Fetching https://cpan.metacpan.org/authors/id/C/CN/CNANGEL/Conf-Libconfig-0.100.tar.gz
>>> perl-conf-libconfig: Checking sha512sums...
Conf-Libconfig-0.100.tar.gz: OK
>>> perl-conf-libconfig: Unpacking /var/cache/distfiles/Conf-Libconfig-0.100.tar.gz...
*** Module::AutoInstall version 1.03
*** Checking for Perl dependencies...
[Core Features]
- Test::Deep          ...loaded. (1.130 >= 0.1)
- Test::More          ...loaded. (1.302186 >= 0.6)
- Test::Warn          ...loaded. (0.36 >= 0.1)
- Test::Exception     ...loaded. (0.43 >= 0.25)
- ExtUtils::PkgConfig ...loaded. (1.16)
- XSLoader            ...loaded. (0.30 >= 0.05)
*** Module::AutoInstall configuration finished.
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Conf::Libconfig
Writing MYMETA.yml and MYMETA.json
Running Mkbootstrap for Libconfig ()
"/usr/bin/perl" "-Iinc" "/usr/share/perl5/core_perl/ExtUtils/xsubpp"  -typemap '/usr/share/perl5/core_perl/ExtUtils/typemap' -typemap '/home/ncopa/aports/testing/perl-conf-libconfig/src/Conf-Libconfig-0.100/typemap'  Libconfig.xs > Libconfig.xsc
chmod 644 "Libconfig.bs"
"/usr/bin/perl" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' -- Libconfig.bs blib/arch/auto/Conf/Libconfig/Libconfig.bs 644
cp lib/Conf/Libconfig.pm blib/lib/Conf/Libconfig.pm
Please specify prototyping behavior for Libconfig.xs (see perlxs manual)
mv Libconfig.xsc Libconfig.c
cc -c   -D_REENTRANT -D_GNU_SOURCE -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Os -fomit-frame-pointer   -DVERSION=\"0.100\" -DXS_VERSION=\"0.100\" -fPIC "-I/usr/lib/perl5/core_perl/CORE"   Libconfig.c
rm -f blib/arch/auto/Conf/Libconfig/Libconfig.so
LD_RUN_PATH="/usr/lib" cc  -shared -Os -fomit-frame-pointer -L/usr/local/lib -fstack-protector-strong  Libconfig.o  -o blib/arch/auto/Conf/Libconfig/Libconfig.so  \
   -lconfig   \
  
chmod 755 blib/arch/auto/Conf/Libconfig/Libconfig.so
Manifying 1 pod document
"/usr/bin/perl" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' -- Libconfig.bs blib/arch/auto/Conf/Libconfig/Libconfig.bs 644
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/00-load.t t/01-init.t t/02-read.t t/03-write.t t/04-specread.t t/05-add.t t/06-delete.t t/07-memory.t t/08-exception.t t/09-complex.t t/10-mutiinit.t t/11-booltest.t t/11-mutinew.t t/12-includedir.t t/boilerplate.t t/pod-coverage.t t/pod-spell.t t/pod.t
# Testing Conf::Libconfig 0.100, Perl 5.034000, /usr/bin/perl
t/00-load.t ........ ok
t/01-init.t ........ ok
t/02-read.t ........ ok
t/03-write.t ....... ok
t/04-specread.t .... ok
t/05-add.t ......... ok
t/06-delete.t ...... ok
t/07-memory.t ...... ok
t/08-exception.t ... ok
[WARN] Settings is null in set_scalarvalue! at /home/ncopa/aports/testing/perl-conf-libconfig/src/Conf-Libconfig-0.100/blib/lib/Conf/Libconfig.pm line 18.
[WARN] Settings is null in set_arrayvalue! at /home/ncopa/aports/testing/perl-conf-libconfig/src/Conf-Libconfig-0.100/blib/lib/Conf/Libconfig.pm line 22.
[WARN] Settings is null in set_scalarvalue! at /home/ncopa/aports/testing/perl-conf-libconfig/src/Conf-Libconfig-0.100/blib/lib/Conf/Libconfig.pm line 18.
[WARN] Settings is null in set_scalarvalue! at /home/ncopa/aports/testing/perl-conf-libconfig/src/Conf-Libconfig-0.100/blib/lib/Conf/Libconfig.pm line 18.
[WARN] Settings is null in set_scalarvalue! at /home/ncopa/aports/testing/perl-conf-libconfig/src/Conf-Libconfig-0.100/blib/lib/Conf/Libconfig.pm line 18.
[WARN] Settings is null in set_scalarvalue! at /home/ncopa/aports/testing/perl-conf-libconfig/src/Conf-Libconfig-0.100/blib/lib/Conf/Libconfig.pm line 18.
[WARN] Settings is null in set_scalarvalue! at /home/ncopa/aports/testing/perl-conf-libconfig/src/Conf-Libconfig-0.100/blib/lib/Conf/Libconfig.pm line 18.
[WARN] Settings is null in set_hashvalue! at t/09-complex.t line 42.

#   Failed test 'ok - add hash key'
#   at t/09-complex.t line 42.
[WARN] Settings is null in set_hashvalue! at /home/ncopa/aports/testing/perl-conf-libconfig/src/Conf-Libconfig-0.100/blib/lib/Conf/Libconfig.pm line 28.
[WARN] Settings is null in set_arrayvalue! at /home/ncopa/aports/testing/perl-conf-libconfig/src/Conf-Libconfig-0.100/blib/lib/Conf/Libconfig.pm line 22.
[WARN] Settings is null in set_hashvalue! at /home/ncopa/aports/testing/perl-conf-libconfig/src/Conf-Libconfig-0.100/blib/lib/Conf/Libconfig.pm line 28.
[WARN] Settings is null in set_scalarvalue! at /home/ncopa/aports/testing/perl-conf-libconfig/src/Conf-Libconfig-0.100/blib/lib/Conf/Libconfig.pm line 18.
[WARN] Settings is null in set_scalarvalue! at /home/ncopa/aports/testing/perl-conf-libconfig/src/Conf-Libconfig-0.100/blib/lib/Conf/Libconfig.pm line 18.
# Looks like you failed 1 test of 5.
t/09-complex.t ..... 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/5 subtests 
t/10-mutiinit.t .... ok
[WARN] Settings is null in set_hashvalue! at t/11-booltest.t line 18.

#   Failed test 'add hash - status ok'
#   at t/11-booltest.t line 18.
[WARN] Settings is null in set_scalarvalue! at t/11-booltest.t line 19.

#   Failed test 'add bool scalar - status ok'
#   at t/11-booltest.t line 19.
[WARN] Settings is null in set_scalarvalue! at t/11-booltest.t line 20.

#   Failed test 'add bool scalar - status ok'
#   at t/11-booltest.t line 20.
[WARN] Settings is null in get_hashvalue at t/11-booltest.t line 24.

#   Failed test 'fetch scalar into hash reference - status ok'
#   at t/11-booltest.t line 24.
# Comparing hash keys of $data
# Missing: 'polling', 'transparent'
[WARN] Settings is null in set_hashvalue! at t/11-booltest.t line 41.

#   Failed test 'add hash - status ok'
#   at t/11-booltest.t line 41.
[WARN] Settings is null in set_scalarvalue! at t/11-booltest.t line 42.

#   Failed test 'add bool scalar - status ok'
#   at t/11-booltest.t line 42.
[WARN] Settings is null in set_scalarvalue! at t/11-booltest.t line 43.

#   Failed test 'add scalar - status ok'
#   at t/11-booltest.t line 43.
[WARN] Settings is null in set_hashvalue! at t/11-booltest.t line 44.

#   Failed test 'add hash - status ok'
#   at t/11-booltest.t line 44.
# Looks like you failed 8 tests of 14.
t/11-booltest.t .... 
Dubious, test returned 8 (wstat 2048, 0x800)
Failed 8/14 subtests 
t/11-mutinew.t ..... ok
[WARN] Settings is null in get_hashvalue at t/12-includedir.t line 44.

#   Failed test 'fetch scalar into hash reference - status ok'
#   at t/12-includedir.t line 44.
# Comparing hash keys of $data
# Missing: 'include_dir'
[WARN] Settings is null in set_hashvalue! at t/12-includedir.t line 78.

#   Failed test 'add hash - status ok'
#   at t/12-includedir.t line 78.
[WARN] Settings is null in set_scalarvalue! at t/12-includedir.t line 79.

#   Failed test 'add scalar - status ok'
#   at t/12-includedir.t line 79.
# Looks like you failed 3 tests of 12.
t/12-includedir.t .. 
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/12 subtests 
t/boilerplate.t .... ok
t/pod-coverage.t ... skipped: Test::Pod::Coverage 1.08 required for testing POD coverage
t/pod-spell.t ...... skipped: Test::Spelling required for testing
t/pod.t ............ ok

Test Summary Report
-------------------
t/05-add.t       (Wstat: 0 Tests: 16 Failed: 0)
  TODO passed:   14
t/09-complex.t   (Wstat: 256 Tests: 5 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
t/11-booltest.t  (Wstat: 2048 Tests: 14 Failed: 8)
  Failed tests:  2-4, 6, 10-13
  Non-zero exit status: 8
t/12-includedir.t (Wstat: 768 Tests: 12 Failed: 3)
  Failed tests:  7, 9-10
  Non-zero exit status: 3
Files=18, Tests=25106,  6 wallclock secs ( 2.18 usr  0.14 sys +  4.90 cusr  0.57 csys =  7.79 CPU)
Result: FAIL
Failed 3/18 test programs. 12/25106 subtests failed.
make: *** [Makefile:966: test_dynamic] Error 255
>>> ERROR: perl-conf-libconfig: check failed

I suspect that hyperrealm/libconfig@2cc55aa is related

Installation fails on Msys2 / Windows 10 system due to libconfig.h not found

I installed libconfig using pacman, I installed it again using sources taken from https://github.com/hyperrealm/libconfig. I've tried using symbolic links to the installed libconfig.h in the core, site, and vendor lib/share folders, and I've following your instructions with regard to passing the include path on the make command line, I even tried using Devel::Trace module to attempt to debug it but admit defeat there - I'm not knowledgeable enough in Perl. Nothing works for me - it is always the same error.

Can you offer some guidance?

bill.e.ghote@COMPUTER MSYS /c/Users/bill.e.ghote/Malware/source/repos/Conf-Libconfig
$ perl Makefile.PL LIBS=-L/usr/local/lib INC=-I/usr/local/include 2>&1 | tee -a err
Can't link/include 'libconfig.h', 'config'

bill.e.ghote@COMPUTER MSYS /c/Users/bill.e.ghote/Malware/source/repos/Conf-Libconfig
$ ls /usr/local/lib/libconfig*
/usr/local/lib/libconfig++.dll.a /usr/local/lib/libconfig.dll.a

bill.e.ghote@COMPUTER MSYS /c/Users/bill.e.ghote/Malware/source/repos/Conf-Libconfig
$ ls /usr/local/include/libconfig*
/usr/local/include/libconfig.h /usr/local/include/libconfig.h++ /usr/local/include/libconfig.hh

bill.e.ghote@COMPUTER MSYS /c/Users/bill.e.ghote/Malware/source/repos/Conf-Libconfig
$ perl -V
Summary of my perl5 (revision 5 version 36 subversion 0) configuration:

Platform:
osname=msys
osvers=3.3.6-341.x86_64
archname=x86_64-msys-thread-multi
uname='msys_nt-10.0-20348 fv-az449-938 3.3.6-341.x86_64 2022-10-24 08:25 utc x86_64 msys '
config_args='-des -Dusethreads -Doptimize=-march=x86-64 -mtune=generic -O2 -pipe -Dprefix=/usr -Dvendorprefix=/usr -Dprivlib=/usr/share/perl5/core_perl -Darchlib=/usr/lib/perl5/core_perl -Dsitelib=/usr/share/perl5/site_perl -Dsitearch=/usr/lib/perl5/site_perl -Dvendorlib=/usr/share/perl5/vendor_perl -Dvendorarch=/usr/lib/perl5/vendor_perl -Dscriptdir=/usr/bin/core_perl -Dsitescript=/usr/bin/site_perl -Dvendorscript=/usr/bin/vendor_perl -Dinc_version_list=none -Dman1ext=1perl -Dman3ext=3perl -Darchname=-msys-threads -Dmyarchname=-msys -Dlibperl=msys-perl5_36.dll -Dcc=gcc -Dld=g++ -Accflags=-march=x86-64 -mtune=generic -O2 -pipe -fwrapv'
hint=recommended
useposix=true
d_sigaction=define
useithreads=define
usemultiplicity=define
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
Compiler:
cc='gcc'
ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -D_GNU_SOURCE -march=x86-64 -mtune=generic -O2 -pipe -fwrapv -fno-strict-aliasing -fstack-protector-strong -D_FORTIFY_SOURCE=2'
optimize='-march=x86-64 -mtune=generic -O2 -pipe'
cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -D_GNU_SOURCE -march=x86-64 -mtune=generic -O2 -pipe -fwrapv -fno-strict-aliasing -fstack-protector-strong'
ccversion=''
gccversion='11.3.0'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
ivtype='long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='off_t'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld='g++'
ldflags =' -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong'
libpth=/usr/lib
libs=-lpthread -lgdbm -ldb -ldl -lcrypt -lgdbm_compat
perllibs=-lpthread -ldl -lcrypt
libc=/usr/lib/libmsys-2.0.a
so=dll
useshrplib=true
libperl=msys-perl5_36.dll
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=dll
d_dlsymun=undef
ccdlflags=' '
cccdlflags=' '
lddlflags=' --shared -Wl,--enable-auto-import -Wl,--export-all-symbols -Wl,--enable-auto-image-base -fstack-protector-strong'

Characteristics of this binary (from libperl):
Compile-time options:
HAS_TIMES
MULTIPLICITY
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_OP_PARENT
PERL_PRESERVE_IVUV
PERL_USE_SAFE_PUTENV
USE_64_BIT_ALL
USE_64_BIT_INT
USE_ITHREADS
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_COLLATE
USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC
USE_LOCALE_TIME
USE_PERLIO
USE_PERL_ATOF
USE_REENTRANT_API
USE_THREAD_SAFE_LOCALE
Built under msys
Compiled at Oct 26 2022 09:46:57
@inc:
/usr/lib/perl5/site_perl
/usr/share/perl5/site_perl
/usr/lib/perl5/vendor_perl
/usr/share/perl5/vendor_perl
/usr/lib/perl5/core_perl
/usr/share/perl5/core_perl

bill.e.ghote@COMPUTER MSYS /c/Users/bill.e.ghote/Malware/source/repos/Conf-Libconfig
$

Install from CPAN fails on Debian 11

Hello,

On a clean Debian 11, cpan Conf::Libconfig fails with:

x86_64-linux-gnu-gcc -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION="1.0.0" -DXS_VERSION="1.0.0" -fPIC "-I/usr/lib/x86_64-linux-gnu/perl/5.32/CORE" Libconfig.c
Libconfig.xs: In function ‘sv2addarray’:
Libconfig.xs:365:19: warning: implicit declaration of function ‘av_count’ [-Wimplicit-function-declaration]
365 | int avlen = (int)av_count(av);
| ^~~~~~~~
Libconfig.xs:391:4: error: label at end of compound statement
391 | default:
| ^~~~~~~
Libconfig.xs: In function ‘sv2addobject’:
Libconfig.xs:430:5: error: label at end of compound statement
430 | default:
| ^~~~~~~
Libconfig.xs:452:5: error: label at end of compound statement
452 | default:
| ^~~~~~~
Libconfig.xs: In function ‘set_general_value’:
Libconfig.xs:486:5: error: label at end of compound statement
486 | default:
| ^~~~~~~
Libconfig.xs:510:5: error: label at end of compound statement
510 | default:
| ^~~~~~~
Libconfig.xs:532:5: error: label at end of compound statement
532 | default:
| ^~~~~~~
Libconfig.xs:554:5: error: label at end of compound statement
554 | default:
| ^~~~~~~
Libconfig.xs: In function ‘get_general_value’:
Libconfig.xs:663:4: error: a label can only be part of a statement and a declaration is not a statement
663 | const char *val = config_setting_get_string(elem);
| ^~~~~
make: *** [Makefile:346 : Libconfig.o] Erreur 1
CNANGEL/Conf-Libconfig-1.0.0.tar.gz
/usr/bin/make -- NOT OK

I am wondering if it's Perl_croak that now somehow expands to nothing, or it always was empty and gcc now complains about it...

fetch_array issues

Ok, I narrowed my problem with 1.0.2 down to two issues:

  • fetch_array segfaults when fetching a name that is not present in the input file
  • fetch_array returns an empty array when fetching a name that is present.

Attached two tiny scripts to exhibit the behaviours:
test_cases.tar.gz

Outputs on my system:

yves@hallertau:~/src/test_cases$ ./fetch_array 
$VAR1 = [];
yves@hallertau:~/src/test_cases$ ./segfault 
Segmentation fault

API to retrieve root setting

It used to be possible to retrieve the entirety of the configuration as a hash doing:

$conf->fetch_hashref("/");

This no longer works in libconfig 1.7.3 (hyperrealm/libconfig#196), and Conf::Libconfig has no API that translates to config_root_setting(), so you cannot get to the root and, e.g., enumerate settings you don't know.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.