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

0.21.3: build fails #222

Closed
kloczek opened this issue Jan 13, 2024 · 14 comments
Closed

0.21.3: build fails #222

kloczek opened this issue Jan 13, 2024 · 14 comments

Comments

@kloczek
Copy link
Contributor

kloczek commented Jan 13, 2024

Looks like build fails
[1/10] Compiling C object src/libpsl.so.5.3.5.p/psl.c.o
FAILED: src/libpsl.so.5.3.5.p/psl.c.o
/usr/bin/gcc -Isrc/libpsl.so.5.3.5.p -Isrc -I../src -I. -I.. -Iinclude -I../include -fvisibility=hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fPIC -DHAVE_CONFIG_H -DBUILDING_PSL '-DPSL_DISTFILE="/usr/share/publicsuffix/public_suffix_list.dafsa"' -MD -MQ src/libpsl.so.5.3.5.p/psl.c.o -MF src/libpsl.so.5.3.5.p/psl.c.o.d -o src/libpsl.so.5.3.5.p/psl.c.o -c ../src/psl.c
../src/psl.c: In function ‘psl_str_to_utf8lower’:
../src/psl.c:108:26: error: ‘ICONV_CONST’ undeclared (first use in this function); did you mean ‘WINICONV_CONST’?
  108 | #  define WINICONV_CONST ICONV_CONST
      |                          ^~~~~~~~~~~
../src/psl.c:1838:53: note: in expansion of macro ‘WINICONV_CONST’
 1838 |                                 else if (iconv(cd, (WINICONV_CONST char **)&tmp, &tmp_len, &dst_tmp, &dst_len_tmp) != (size_t)-1
      |                                                     ^~~~~~~~~~~~~~
../src/psl.c:108:26: note: each undeclared identifier is reported only once for each function it appears in
  108 | #  define WINICONV_CONST ICONV_CONST
      |                          ^~~~~~~~~~~
../src/psl.c:1838:53: note: in expansion of macro ‘WINICONV_CONST’
 1838 |                                 else if (iconv(cd, (WINICONV_CONST char **)&tmp, &tmp_len, &dst_tmp, &dst_len_tmp) != (size_t)-1
      |                                                     ^~~~~~~~~~~~~~
../src/psl.c:1838:68: error: expected ‘)’ before ‘char’
 1838 |                                 else if (iconv(cd, (WINICONV_CONST char **)&tmp, &tmp_len, &dst_tmp, &dst_len_tmp) != (size_t)-1
      |                                                    ~               ^~~~
ninja: build stopped: subcommand failed.
meson output
+ /usr/bin/meson setup --buildtype=plain --prefix=/usr --libdir=/usr/lib64 --libexecdir=/usr/libexec --bindir=/usr/bin --sbindir=/usr/sbin --includedir=/usr/include --datadir=/usr/share --mandir=/usr/share/man --infodir=/usr/share/info --localedir=/usr/share/locale --sysconfdir=/etc --localstatedir=/var --sharedstatedir=/var/lib --wrap-mode=nodownload --auto-features=enabled . x86_64-redhat-linux-gnu -D runtime=libidn2 -D builtin=false -D psl_distfile=/usr/share/publicsuffix/public_suffix_list.dafsa -D psl_file=/usr/share/publicsuffix/effective_tld_names.dat -D psl_testfile=/usr/share/publicsuffix/test_psl.txt
The Meson build system
Version: 1.3.1
Source dir: /home/tkloczko/rpmbuild/BUILD/libpsl-0.21.3
Build dir: /home/tkloczko/rpmbuild/BUILD/libpsl-0.21.3/x86_64-redhat-linux-gnu
Build type: native build
Project name: libpsl
Project version: 0.21.3
C compiler for the host machine: /usr/bin/gcc (gcc 13.2.1 "gcc (GCC) 13.2.1 20231205 (Red Hat 13.2.1-6)")
C linker for the host machine: /usr/bin/gcc ld.bfd 2.41-20
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: YES (/usr/bin/pkg-config) 2.1.0
Run-time dependency libidn2 found: YES 2.3.4
Library unistring found: YES
Run-time dependency iconv found: YES
Check usable header "unistd.h" : YES
Check usable header "stdint.h" : YES
Check usable header "alloca.h" : YES
Check usable header "dirent.h" : YES
Checking for function "alloca" : YES
Checking for function "strndup" : YES
Checking for function "clock_gettime" : YES
Checking for function "fmemopen" : YES
Checking for function "nl_langinfo" : YES
Compiler for C supports function attribute visibility: YES
Configuring config.h using configuration
Program python3 found: YES (/usr/bin/python3)
Configuring libpsl.h using configuration
Build targets in project: 11

libpsl 0.21.3

  User defined options
    auto_features : enabled
    bindir        : /usr/bin
    buildtype     : plain
    datadir       : /usr/share
    includedir    : /usr/include
    infodir       : /usr/share/info
    libdir        : /usr/lib64
    libexecdir    : /usr/libexec
    localedir     : /usr/share/locale
    localstatedir : /var
    mandir        : /usr/share/man
    prefix        : /usr
    sbindir       : /usr/sbin
    sharedstatedir: /var/lib
    sysconfdir    : /etc
    wrap_mode     : nodownload
    builtin       : false
    psl_distfile  : /usr/share/publicsuffix/public_suffix_list.dafsa
    psl_file      : /usr/share/publicsuffix/effective_tld_names.dat
    psl_testfile  : /usr/share/publicsuffix/test_psl.txt
    runtime       : libidn2
@kloczek
Copy link
Contributor Author

kloczek commented Jan 13, 2024

Just in case .. I'm using gettext 0.22.4.

@rockdaboot
Copy link
Owner

Hm, it should be defined in config.h, but I only test with autotools.

@rockdaboot
Copy link
Owner

I created #223, so that we can catch such issues earlier.

@kloczek
Copy link
Contributor Author

kloczek commented Jan 13, 2024

In the same build env build of libpsl 0.21.2 is OK.

@rockdaboot
Copy link
Owner

Yes, it is because I tried to fix iconv() on Solaris (and some other obscure systems).
ICONV_CONST should always be set in config.h, but surely meson doesn't do it.

@kloczek
Copy link
Contributor Author

kloczek commented Jan 13, 2024

Meson can collect detection results in config.h file as well.

@kloczek
Copy link
Contributor Author

kloczek commented Jan 13, 2024

In the same build env build of libpsl 0.21.2 is OK.

In bot cases (0.21.2 and 0.21.3) I've been using meson.

@rockdaboot
Copy link
Owner

It can be fixed in meson or in the code (just an #ifdef).
But meson is a second-class build system for me (doesn't mean it's bad or so).
I am personally very familiar with autotools and stick with it.

@rockdaboot
Copy link
Owner

Can you test #224 ?

@kloczek
Copy link
Contributor Author

kloczek commented Jan 13, 2024

I understand .. 👍
This issue is not-so-critical and I have few other more important things to do. Just please let me know if you will have any fix.
I would be glad to try to test before actual merge 😋

@rockdaboot
Copy link
Owner

I just tested with meson, looks good now.

@kloczek
Copy link
Contributor Author

kloczek commented Jan 13, 2024

Can you test #224 ?

It works.
Just tested that and build os OK and test suite as well

warning: Downloading https://github.com/rockdaboot/libpsl//archive/0.21.3/libpsl-0.21.3.tar.gz to /home/tkloczko/rpmbuild/SOURCES/libpsl-0.21.3.tar.gz
warning: Downloading https://github.com/rockdaboot/libpsl//pull/224.patch#/libpsl-Fix-ICONV_CONST-build-failure.patch to /home/tkloczko/rpmbuild/SOURCES/libpsl-Fix-ICONV_CONST-build-failure.patch
warning: Macro expanded in comment on line 107: %{_datadir}/gtk-doc/html/*

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.BDMyvh
+ umask 022
+ cd /home/tkloczko/rpmbuild/BUILD
+ rm -rf libpsl-0.21.3
+ /usr/lib/rpm/rpmuncompress -x /home/tkloczko/rpmbuild/SOURCES/libpsl-0.21.3.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd libpsl-0.21.3
+ rm -rf /home/tkloczko/rpmbuild/BUILD/libpsl-0.21.3/SPECPARTS
+ /usr/bin/mkdir -p /home/tkloczko/rpmbuild/BUILD/libpsl-0.21.3/SPECPARTS
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/libpsl-Fix-ICONV_CONST-build-failure.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch -f
+ /usr/lib/rpm/rpmuncompress /home/tkloczko/rpmbuild/SOURCES/libpsl-shebangs.patch

+ cd libpsl-0.21.3
+ /usr/bin/meson test -C x86_64-redhat-linux-gnu --num-processes 48 --print-errorlogs
ninja: Entering directory `/home/tkloczko/rpmbuild/BUILD/libpsl-0.21.3/x86_64-redhat-linux-gnu'
ninja: no work to do.
1/6 test-is-public                          OK              0.03s
2/6 test-is-cookie-domain-acceptable        OK              0.03s
3/6 libpsl_idn2_fuzzer                      OK              0.02s
4/6 libpsl_idn2_load_dafsa_fuzzer           OK              0.01s
5/6 test-is-public-all                      OK              0.12s
6/6 libpsl_idn2_load_fuzzer                 OK              0.17s

Ok:                 6
Expected Fail:      0
Fail:               0
Unexpected Pass:    0
Skipped:            0
Timeout:            0

Thank you 👍 😄

@rockdaboot
Copy link
Owner

Thx, released v0.21.4 just now

@kloczek
Copy link
Contributor Author

kloczek commented Jan 13, 2024

Thank you 👍 😄

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