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

"configure" fails on Ubuntu 22.04 LTS (WSL2) #86

Open
SomeoneElseOSM opened this issue Mar 30, 2023 · 2 comments
Open

"configure" fails on Ubuntu 22.04 LTS (WSL2) #86

SomeoneElseOSM opened this issue Mar 30, 2023 · 2 comments

Comments

@SomeoneElseOSM
Copy link
Contributor

https://gnucobol.sourceforge.io/faq/index.html#does-gnucobol-support-any-sql-databases
suggests "Coded for ./configure; make; make check && sudo make install"

https://github.com/opensourcecobol/Open-COBOL-ESQL/blob/master/README#L77
suggests the same thing

Postgres is installed:

libpq5/jammy-updates,jammy-security,now 14.7-0ubuntu0.22.04.1 amd64 [installed,automatic]
postgis/jammy,now 3.2.0+dfsg-1ubuntu1 amd64 [installed]
postgis-doc/jammy,now 3.2.0+dfsg-1ubuntu1 all [installed,automatic]
postgresql/jammy,now 14+238 all [installed]
postgresql-14/jammy-updates,jammy-security,now 14.7-0ubuntu0.22.04.1 amd64 [installed,automatic]
postgresql-14-postgis-3/jammy,now 3.2.0+dfsg-1ubuntu1 amd64 [installed]
postgresql-14-postgis-3-scripts/jammy,now 3.2.0+dfsg-1ubuntu1 all [installed]
postgresql-client-14/jammy-updates,jammy-security,now 14.7-0ubuntu0.22.04.1 amd64 [installed,automatic]
postgresql-client-common/jammy,now 238 all [installed,automatic]
postgresql-common/jammy,now 238 all [installed,automatic]
postgresql-contrib/jammy,now 14+238 all [installed]

I've also done:

sudo apt install postgresql-server-dev-14
sudo apt install g++

"postgresql-server-dev-14" brought in "libpq-dev" among other things, and:

$ find /usr/include -name libpq-fe.h -print
/usr/include/postgresql/libpq-fe.h

I configure and make:
./configure
(snip)

$ make
make  all-recursive
make[1]: Entering directory '/home/ajtown/src/Open-COBOL-ESQL'
Making all in dblib
make[2]: Entering directory '/home/ajtown/src/Open-COBOL-ESQL/dblib'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -lpq -O2 -MT ocesql.lo -MD -MP -MF .deps/ocesql.Tpo -c -o ocesql.lo ocesql.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -lpq -O2 -MT ocesql.lo -MD -MP -MF .deps/ocesql.Tpo -c ocesql.c  -fPIC -DPIC -o .libs/ocesql.o
In file included from ocdb.h:33,
             from ocesql.h:22,
             from ocesql.c:29:
ocpgsql.h:21:10: fatal error: libpq-fe.h: No such file or directory
   21 | #include <libpq-fe.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:418: ocesql.lo] Error 1
make[2]: Leaving directory '/home/ajtown/src/Open-COBOL-ESQL/dblib'
make[1]: *** [Makefile:393: all-recursive] Error 1
make[1]: Leaving directory '/home/ajtown/src/Open-COBOL-ESQL'
make: *** [Makefile:324: all] Error 2

Any suggestions?

@SomeoneElseOSM
Copy link
Contributor Author

Obviously I'm aware of a bunch of other issues at https://github.com/opensourcecobol/Open-COBOL-ESQL/issues?q=is%3Aissue+configure , but nothing exactly the same as this. If there was some actual documentation that explained what "configure" and "make" are doing here (beyond the obvious) it may be possible for people to figure out what the problem is.

@SomeoneElseOSM
Copy link
Contributor Author

Actually, I should have read a couple of lines further down: https://github.com/opensourcecobol/Open-COBOL-ESQL/blob/master/README#L83 "For use with PostgreSQL 9.0 or later" :)

Doing "export CPPFLAGS=..." (but for the actual location that's valid for me, "/usr/include/postgresql") gets me further. PostgreSQL 9 was released in 2010 (when some young chap called Barack Obama had just become president). If I can get something working I'll see what else needs changing and submit a PR for the readme.

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

1 participant