Skip to content

Conversation

@paulrho
Copy link
Contributor

@paulrho paulrho commented Nov 22, 2021

No description provided.

configure.ac Outdated
PKG_CHECK_MODULES(LIBOAUTH, oauth)
PKG_CHECK_MODULES(LIBPCRE, libpcre)
#PKG_CHECK_MODULES(LIBPCRE2, libpcre2)
PKG_CHECK_MODULES(PCRE2, [libpcre2-8 libpcre2-32])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious: why -8 and -32?
On my Debian/unstable system I can see:

/usr/lib/x86_64-linux-gnu/pkgconfig/libpcre2-16.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/libpcre2-32.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/libpcre2-8.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/libpcre2-posix.pc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the -32

@gregoa
Copy link
Contributor

gregoa commented Nov 22, 2021

Alright, I added this PR as a patch to the Debian package, and unfortunately the build fails at the linker stage:

gcc -I/usr/include/x86_64-linux-gnu -I/usr/include/libxml2 -I/usr/include/json-c  -I/usr/include/x86_64-linux-gnu -I/usr/include/nss -I/usr/include/nspr -g -O2 -ffile-prefix-map=/build/bti-034=. -fstack-protector-strong -Wformat -Werror=format-security  -Wl,-z,relro -Wl,-z,now -o bti bti-config.o bti-bti.o -lcurl -lxml2 -ljson-c  -loauth -ldl 
/usr/bin/ld: bti-bti.o: in function `find_urls':
/tmp/buildd/bti-034/bti.c:1298: undefined reference to `pcre2_compile_8'
/usr/bin/ld: /tmp/buildd/bti-034/bti.c:1310: undefined reference to `pcre2_match_data_create_from_pattern_8'
/usr/bin/ld: /tmp/buildd/bti-034/bti.c:1312: undefined reference to `pcre2_match_8'
/usr/bin/ld: /tmp/buildd/bti-034/bti.c:1322: undefined reference to `pcre2_get_ovector_pointer_8'
/usr/bin/ld: /tmp/buildd/bti-034/bti.c:1339: undefined reference to `pcre2_code_free_8'
collect2: error: ld returned 1 exit status

If I manually add -lpcre2-8 at the end of the gcc call, it works.

Looks like there's some more autoconf/automake magic needed to get the needed flags in the needed places.

@paulrho
Copy link
Contributor Author

paulrho commented Nov 22, 2021

Okay, try again (pull request is automatically updated with this correction correction).
I'd modified the Makefile, but not the Makefile.am - now fixed.
I've checked that it builds on a fresh Fedora machine.

Copy link
Contributor Author

@paulrho paulrho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds and runs without the -32

configure.ac Outdated
PKG_CHECK_MODULES(LIBOAUTH, oauth)
PKG_CHECK_MODULES(LIBPCRE, libpcre)
#PKG_CHECK_MODULES(LIBPCRE2, libpcre2)
PKG_CHECK_MODULES(PCRE2, [libpcre2-8 libpcre2-32])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the -32

@gregoa
Copy link
Contributor

gregoa commented Nov 22, 2021

Thanks! This looks good indeed.
I'm able to build the package, and I can even send a tweet with it:
https://twitter.com/gregoa_/status/1462895918596820995
:)

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

Successfully merging this pull request may close these issues.

2 participants