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

xzcat program #109

Closed
cvvergara opened this issue Jul 29, 2021 · 9 comments
Closed

xzcat program #109

cvvergara opened this issue Jul 29, 2021 · 9 comments

Comments

@cvvergara
Copy link
Contributor

Test uses xzcat program, but

  1. that is not available on all platgorms as decompression program to xz files
  2. Its not looked for on the build

As note for the future:
cmake can do decompression of files https://cmake.org/cmake/help/latest/command/file.html#archive-extract but its available from 3.19 which means that in many operative systems that version might not be available yet.

@estebanzimanyi
Copy link
Member

Please see the note I put on the closed issue about zstd which is available on 3.15
https://cmake.org/cmake/help/latest/release/3.15.html?highlight=zstd

@cvvergara
Copy link
Contributor Author

Can you give me a link to the issue you mention?

@estebanzimanyi
Copy link
Member

estebanzimanyi commented Jul 29, 2021 via email

@cvvergara
Copy link
Contributor Author

Link to comment:
#85 (comment)

This is what I found about xy files:
https://fileinfo.com/extension/xz
So using something specific that works, say for my computer, it might not work to other systems.
As Regina mentions in this mail:
https://lists.osgeo.org/pipermail/postgis-devel/2021-July/029058.html

I think using sed and awk in a cmake project is a big NO NO.

Its the same thing for xzcat, the no no, is that they do not exist in other systems.

That comment has a link to cmake 3.15, if someone is to package with, say bionic, the cmake that they woul be using is 3.10
https://packages.ubuntu.com/bionic/cmake
So if you wants minimum cmake 3.15 then it wouldn't be packaged for bionic (which hasn't reached its EOL).

This is what currently pgRouting has as minimum in order for it to be packaged to several others systems:
https://github.com/pgRouting/pgrouting/blob/main/CMakeLists.txt#L1

I pumped it up in mobilitydb from 3.1 to 3.2
https://github.com/MobilityDB/MobilityDB/blob/master/CMakeLists.txt#L1
https://github.com/MobilityDB/MobilityDB/blob/develop/CMakeLists.txt#L1

Which cmake to be the minimum one, must not be taken lightly, will affect to which systems you are willing to support.

@estebanzimanyi
Copy link
Member

estebanzimanyi commented Jul 30, 2021

I think we can simply change xzcat by gzcat. We used xz for its reduced size. For example, compressing the file test/general/data with both xz and gzip shows the difference

-rw-r--r-- 1 esteban esteban 2524628 Jul 27 10:46 load.sql.xz
-rw-r--r-- 1 esteban esteban 3947025 Jul 30 10:25 load.sql.gz

Therefore we can simply switch to gzip to enable multiplatform builds. In particular MSYS2 supports gzip but does not have the command gzcat. However, this is not a problem since it is equivalent to gunzip -c.

Just out of curiosity, which feature required to move cmake from 3.1 to 3.2?

@cvvergara
Copy link
Contributor Author

abd5277

@estebanzimanyi
Copy link
Member

Muchas gracias !

@estebanzimanyi
Copy link
Member

estebanzimanyi commented Aug 10, 2021

I found out that MSYS2 comes with xz
https://packages.msys2.org/base/mingw-w64-xz
and MacOS also
https://formulae.brew.sh/formula/xz
So I think we can leave xz for the moment.

estebanzimanyi added a commit to estebanzimanyi/MobilityDB that referenced this issue Aug 14, 2021
estebanzimanyi added a commit to estebanzimanyi/MobilityDB that referenced this issue Aug 14, 2021
estebanzimanyi added a commit to estebanzimanyi/MobilityDB that referenced this issue Aug 14, 2021
estebanzimanyi added a commit to estebanzimanyi/MobilityDB that referenced this issue Aug 14, 2021
@estebanzimanyi
Copy link
Member

PR #155

estebanzimanyi added a commit that referenced this issue Aug 20, 2021
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