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

cpan Conf::Libconfig failed #16

Open
Nitro56 opened this issue Apr 22, 2023 · 4 comments
Open

cpan Conf::Libconfig failed #16

Nitro56 opened this issue Apr 22, 2023 · 4 comments

Comments

@Nitro56
Copy link

Nitro56 commented Apr 22, 2023

Hi, I have some problems during cpan Conf::Libconfig

Reading '/root/.cpan/Metadata'
Database was generated on Sat, 22 Apr 2023 11:54:01 GMT
Could not expand [Conf::Libconfigsudo]. Check the module name.
I can suggest names if you install one of Text::Levenshtein::XS, Text::Levenshtein::Damerau::XS, Text::Levenshtein, and Text::Levenshtein::Damerau::PP
and you provide the -x option on invocation.
Skipping Conf::Libconfigsudo because I couldn't find a matching namespace.
Could not expand [cpan]. Check the module name.
Skipping cpan because I couldn't find a matching namespace.
Running install for module 'Conf::Libconfig'
Checksum for /root/.cpan/sources/authors/id/C/CN/CNANGEL/Conf-Libconfig-1.0.0.tar.gz ok
Configuring C/CN/CNANGEL/Conf-Libconfig-1.0.0.tar.gz with Makefile.PL
*** Module::AutoInstall version 1.03
*** Checking for Perl dependencies...
*** Since we're running under CPAN, I'll just let it take care
of the dependency's installation later.
[Core Features]

  • Test::Deep ...loaded. (1.204 >= 0.1)
  • Test::More ...loaded. (1.302194 >= 0.6)
  • Test::Warn ...loaded. (0.37 >= 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
    CNANGEL/Conf-Libconfig-1.0.0.tar.gz
    /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
    Running make for C/CN/CNANGEL/Conf-Libconfig-1.0.0.tar.gz
    cp lib/Conf/Libconfig.pm blib/lib/Conf/Libconfig.pm
    Running Mkbootstrap for Libconfig ()
    chmod 644 "Libconfig.bs"
    "/usr/bin/perl" "-Iinc" -MExtUtils::Command::MM -e 'cp_nonempty' -- Libconfig.bs blib/arch/auto/Conf/Libconfig/Libconfig.bs 644
    "/usr/bin/perl" "-Iinc" "/usr/share/perl/5.32/ExtUtils/xsubpp" -typemap '/usr/share/perl/5.32/ExtUtils/typemap' -typemap '/root/.cpan/build/Conf-Libconfig-1.0.0-3/typemap' Libconfig.xs > Libconfig.xsc
    Please specify prototyping behavior for Libconfig.xs (see perlxs manual)
    mv Libconfig.xsc Libconfig.c
    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
@yrutschle
Copy link
Owner

I ran into this myself last week -- it's not really conf2struct-related, it seems like Debian 11's gcc changed behaviour somehow and Conf::Libconfig no longer compiles on it. I'm unclear on how to fix this nor how to contribute to CPAN, but I'll look into it.

I created an issue on Conf::Libconfig's github cnangel/Conf-Libconfig#4

@yrutschle
Copy link
Owner

I pushed a fix in my (experimental) fork here: https://github.com/yrutschle/Conf-Libconfig
I haven't tried if it installed, but hopefully following the steps in the README should work, basically:

perl Makefile.PL
make
make test   # they don't all work
make install

I don't have time to try on a clean Debian 11 right now, and won't for a couple of weeks I'm afraid. Let me know if this helps!

@yrutschle
Copy link
Owner

I just had time to try it, and it in fact crashes Perl. So I guess this does not help.

@yrutschle
Copy link
Owner

Ok, I was looking in the wrong place: the Perl Module was very recently updated for libconfig-1.7.3, and that's what seems to break the build (on Debian, or on older libconfigs, or... I am not sure yet).
What works for me on a recent Debian:

git clone https://github.com/cnangel/Conf-Libconfig.git
cd Conf-Libconfig
git checkout 3049596d86ba0b9f40cd1c139edf73c92867a8ad
perl Makefile.PL
make
make test
sudo make install

This will install an older version. Let me know if this helps! (I'll try to find what the later changes break)

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

No branches or pull requests

2 participants