r-hub / rhub

R-hub API client
https://r-hub.github.io/rhub/
Other
347 stars 49 forks source link

Checks fail on `RPostgreSQL` due to missing `libpq-fe.h` header #571

Closed averissimo closed 8 months ago

averissimo commented 8 months ago

Package failing on build: RPostgreSQL (CRAN)

This is happening on 3 of the platforms with rhub::check_for_cran:

For ubuntu this should fix the problem: sudo apt-get install libpq-dev

note: Windows Server 2022, R-devel, 64 bit (build) and Windows Server 2022, R-release, 32/64 bit (build) were successfully

gaborcsardi commented 8 months ago

Thanks, fixed here: https://github.com/r-hub/sysreqsdb/commit/d8424555abd6b06bbfdacfba448f68a51dab4453

Should be good now.

averissimo commented 8 months ago

Thanks @gaborcsardi for the quick reply, I see that the problem is solved on Ubuntu builds, but not in Fedora build

using C compiler: ‘clang version 14.0.5 (Fedora 14.0.5-2.fc36)’
/usr/bin/clang -I"/opt/R-devel/lib64/R/include" -DNDEBUG -I  -I/usr/local/include    -fpic  -g -O2  -c RS-DBI.c -o RS-DBI.o
/usr/bin/clang -I"/opt/R-devel/lib64/R/include" -DNDEBUG -I  -I/usr/local/include    -fpic  -g -O2  -c RS-PQescape.c -o RS-PQescape.o
In file included from RS-PQescape.c:7:
./RS-PostgreSQL.h:23:14: fatal error: 'libpq-fe.h' file not found
#    include "libpq-fe.h"
             ^~~~~~~~~~~~
1 error generated.
make: *** [/opt/R-devel/lib64/R/etc/Makeconf:191: RS-PQescape.o] Error 1
ERROR: compilation failed for package ‘RPostgreSQL’
* removing ‘/home/docker/R/RPostgreSQL’
averissimo commented 8 months ago

Here are the platforms that no longer have problems :grin:

Debian Linux, R-release, GCC Ubuntu Linux 20.04.1 LTS, R-release, GCC Ubuntu Linux 20.04.1 LTS, R-devel, GCC

gaborcsardi commented 8 months ago

I cannot check this now, but hopefully this fixes it for RPM distros: https://github.com/r-hub/sysreqsdb/commit/91075e18efeb9ca6e1cb2f4184c4911843484c77

averissimo commented 8 months ago

I confirm it works on Fedora. https://builder.r-hub.io/status/original/shiny.telemetry_0.2.0.tar.gz-d8dc9a5772984a3da811673a6404df44

Thanks

gaborcsardi commented 8 months ago

Thanks for the report!