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

Undefined reference during build with LASzip 3.x #192

Open
virtuozo007 opened this issue Jul 15, 2020 · 9 comments
Open

Undefined reference during build with LASzip 3.x #192

virtuozo007 opened this issue Jul 15, 2020 · 9 comments

Comments

@virtuozo007
Copy link

virtuozo007 commented Jul 15, 2020

If I compile without Laszip, everyting works well.
But when I compile with laszip(3.4.3), comes out errors as follows:

/usr/bin/ld: ../bin/Release/liblas.so.2.4.0: undefined reference to `LASzipper::~LASzipper()'
/usr/bin/ld: ../bin/Release/liblas.so.2.4.0: undefined reference to `LASunzipper::LASunzipper()'
/usr/bin/ld: ../bin/Release/liblas.so.2.4.0: undefined reference to `LASunzipper::close()'
/usr/bin/ld: ../bin/Release/liblas.so.2.4.0: undefined reference to `LASzipper::open(std::ostream&, LASzip const*)'
/usr/bin/ld: ../bin/Release/liblas.so.2.4.0: undefined reference to `LASunzipper::open(std::istream&, LASzip const*)'
/usr/bin/ld: ../bin/Release/liblas.so.2.4.0: undefined reference to `LASzipper::write(unsigned char const* const*)'
/usr/bin/ld: ../bin/Release/liblas.so.2.4.0: undefined reference to `LASzipper::LASzipper()'
/usr/bin/ld: ../bin/Release/liblas.so.2.4.0: undefined reference to `LASunzipper::seek(unsigned int)'
/usr/bin/ld: ../bin/Release/liblas.so.2.4.0: undefined reference to `LASunzipper::~LASunzipper()'
/usr/bin/ld: ../bin/Release/liblas.so.2.4.0: undefined reference to `LASunzipper::get_error() const'
/usr/bin/ld: ../bin/Release/liblas.so.2.4.0: undefined reference to `LASunzipper::read(unsigned char* const*)'
/usr/bin/ld: ../bin/Release/liblas.so.2.4.0: undefined reference to `LASzipper::get_error() const'

I am very sure that the 'laszip' lib has already been installed into the path "/usr/local/lib".

Is this a bug? Thanks.

@mloskot
Copy link
Member

mloskot commented Jul 15, 2020

Check what CMake output says about laszip.
Try laszip 2.x.

@virtuozo007
Copy link
Author

Check what CMake output says about laszip.
Try laszip 2.x.

You are right. I changed to laszip(2.2.0) and it works.

@mloskot mloskot changed the title LASzip error Undefined reference during build with LASzip 3.x Jul 16, 2020
@mloskot
Copy link
Member

mloskot commented Jul 16, 2020

Thanks for the confirmation. The libLAS 1.8 will probably stick to LASzip 2.x.

@MikeCernea
Copy link

Hello,
I am trying to add liblas with laszip using vcpkg, but vcpkg only has laszip3.
How can I go about using liblas with zip support this way?
Thank you.

@mloskot
Copy link
Member

mloskot commented Apr 3, 2021

As the comments above explain, you'll need to install laszip 2 anr build liblas against it.

@MikeCernea
Copy link

MikeCernea commented Apr 3, 2021

Hello mloskot,
where do I get laszip2 (official github only has v3 and google does not find any page with v2)?
Also, is there a way to configure vcpkg to install laszip2 (I only see laszip3 port) ?
Thanks

@mloskot
Copy link
Member

mloskot commented Apr 3, 2021

No idea. Ask laszip and maintainers.

There always is a way.

@MikeCernea
Copy link

Thank you.
For curiosity, what is the purpose of LASzip 3.x if all libraries use liblas to build LAS files and v3 is not compatible with this version, who uses v3 and to what goal?

@mloskot
Copy link
Member

mloskot commented Apr 4, 2021

I don't know what the all libraries you mean. Please, read the "As of 2018, libLAS has been replaced by the PDAL" paragraph https://liblas.org

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

3 participants