postgrespro / pgsphere

PgSphere provides spherical data types, functions, operators, and indexing for PostgreSQL.
https://pgsphere.org
BSD 3-Clause "New" or "Revised" License
16 stars 14 forks source link

Make healpix+smoc compilation optional #19

Closed vitcpp closed 1 year ago

esabol commented 1 year ago

Yeah, I could really use this, I think. Our main database server is still RHEL 6.x, and I don't think there's a libhealpix for it. I'm not seeing a package for it at least.

I'm getting compilation errors when trying to compile the current master branch of this repo:

g++ -Wall -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -O2 -fPIC -DPGSPHERE_VERSION=1.2.1 -I. -I./ -I/local/postgres/install/15.3/include/server -I/lo
cal/postgres/install/15.3/include/internal  -D_GNU_SOURCE    -c -o src/process_moc.o src/process_moc.cpp
src/process_moc.cpp:17:26: error: healpix_base.h: No such file or directory
src/process_moc.cpp: In function 'size_t get_moc_debug(const char**, void (*)(const char*, int))':
src/process_moc.cpp:69: error: expected type-specifier before 'PlanckError'
src/process_moc.cpp:69: error: expected ')' before '&' token
src/process_moc.cpp:69: error: expected '{' before '&' token
src/process_moc.cpp:69: error: 'e' was not declared in this scope
src/process_moc.cpp:69: error: expected ';' before ')' token
src/process_moc.cpp:69: error: expected primary-expression before 'catch'
src/process_moc.cpp:69: error: expected ';' before 'catch'
src/process_moc.cpp: In function 'void moc_debug_log(void (*)(const char*, int), const char*, ...)':
src/process_moc.cpp:84: error: expected type-specifier before 'PlanckError'
src/process_moc.cpp:84: error: expected ')' before '&' token
src/process_moc.cpp:84: error: expected '{' before '&' token
src/process_moc.cpp:84: error: 'e' was not declared in this scope
src/process_moc.cpp:84: error: expected ';' before ')' token
src/process_moc.cpp:84: error: expected primary-expression before 'catch'

etc.

Any short-term workarounds that I can employ?

esabol commented 1 year ago

Any short-term workarounds that I can employ?

I hacked away at the Makefile using https://github.com/postgrespro/pgsphere/pull/13 as a guideline and managed to get it to compile, install, and crushtest OK. Whew!

vitcpp commented 1 year ago

@esabol I did that PR but I had a talk with our colleagues from ivoa (I guess). They wanted to make some changes in Makefile till the end of June. I've postponed my changes to avoid conflicts. I will ask them again at the beginning of next week and proceed with it.

esabol commented 1 year ago

Oh, I was going to submit a PR for this, but I'll defer to yours.

vitcpp commented 1 year ago

Dear @msdemlei, @df7cb. We spoke about some cleanup in Makefile. It was told that there are some changes are planning from your side in Makefile stuff (https://github.com/postgrespro/pgsphere/pull/8#issuecomment-1596674535). It least I've understood so. How is your progress going? I would like to continue with optional healpix but I'm still waiting some changes from your side to avoid potential conflicts.

I would also propose to create a new Issue for Makefile cleanup task to be able to discuss some changes.

df7cb commented 1 year ago

Hi, we aren't ready with that yet, so please just go ahead with your changes and we'll cope afterwards. Thanks!

vitcpp commented 1 year ago

@esabol If you are already have a prepared patch, please, create a PR (may be after PARALLEL SAFE). Otherwise, I will plan to do it. Thank you!

vitcpp commented 1 year ago

The issue is done. @esabol Thank you very much!