Open ndavid opened 11 years ago
That's interesting. The automake setup that LAG has was never done propperly in the first place, but for the life of me, I can't work out how it's supposed to be. I'm looking at cmake now, and it seems quite reasonably documented at a glance.
I did not manage to compile with cmake yet, as I actually have a different setup for laslib. There's a long story to that, but the short version is that I've now got a folder called lastools-patched in the testing branch, this has some handwritten makefiles to build laslib and install it as a dynamic linkable, complete with relevant pkg-config file.
Would you mind taking a look at the testing branch and see if you can get it to play with the dynamic linkable instead? (Or just give me some pointers on what I need to do to do that myself.) Would it be possible to make the build process support both versions?
I've updated my lag fork with an up-to-date testing branch and I've added some laslib compilation support within the cmake project. Cmake project now support
So the basics steps for compilation are now:
$ cd path/toLag/
$ mkdir build_lag
$ cd build_lag
$ cmake-gui ../
$ make
$ sudo make install
I've created laslib compilation from scratch as I could not find any makefile on the lastools-patched directory. There is still room for cmake improvement.
Ok, so, I have finally gotten around to looking through and giving this a whirl. Compiling was awesomely easy, though there was quite a few warnings from LASlib that I probably wont ever do anything about.
However, the bit I was worried about turned out not to work. My compilation segfaults when attempting to load a file. The backtrace is here:
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00000000004d33d1 in LASreader::read_point() ()
#2 0x00000000004cf769 in LoadWorker::load_points(Quadtree*) ()
#3 0x00000000004d09db in LoadWorker::run() ()
#4 0x00000000004894c4 in sigc::bound_mem_functor0<void, Worker>::operator()() const ()
#5 0x0000000000488e18 in sigc::adaptor_functor<sigc::bound_mem_functor0<void, Worker> >::operator()() const ()
#6 0x00000000004883ff in sigc::internal::slot_call0<sigc::bound_mem_functor0<void, Worker>, void>::call_it(sigc::internal::slot_rep*) ()
#7 0x0000003230a428dd in ?? () from /lib64/libglibmm-2.4.so.1
#8 0x000000307b46a305 in ?? () from /lib64/libglib-2.0.so.0
#9 0x0000003079c07d14 in start_thread () from /lib64/libpthread.so.0
#10 0x00000030798f167d in clone () from /lib64/libc.so.6
I tried both static and shared builds of LASlib and achieved the same results. Any ideas? Is this liable to fail due to my pre-existing build of LASlib? I could try this from a clean VM if you think it would help.
Unfortunately loading las file works quite fine for me so I can't reproduce your bug. What is your gnu/linux distribution ?
But from your backtrace it's seems like read_point() from laslib is pointing toward a null function. So I think error should be related to laslib. I think error could be due to the use of existing lasreader.hpp file on your standard include path (/usr/include, /usr/local/include) but linking with the internal lastool-patched library.
So for debugguing purpose could you run some command line :
Could-you also test compilation after uninstalling all laslib stuff on /usr directory ?
And last perhaps it's could help to compile/run lag with debug build (with cmake-gui you could manually set CMAKE_BUILD_TYPE to Debug)
Hope it will help.
The LASlib warnings are most likely an upstream problem, so I wont fix those for now, as anything I do to the LASlib code might get overwritten and I'll be forever merging conflicts every LASlib update.
I will look deeper into my segfault issue soon, but what you're saying sounds about right and I think I've had problems like that before, too. I'm working on an extremely modified Fedora17 system.
This has been on top of my to-do list for quite a while with LAG, and since looking at it I've gone away and done some substantial work on another project which has ended up taking up a few months of time. In that time LASlib's changed quite a lot, and I've been keeping up with the makefiles just about, but it looks like this patch hasn't been.
I still don't really understand cmake, and I'm not sure what I can do to maintain this. If you're still interested, can you get in touch with me to discuss the newer version of LASlib and updating the cmakefiles? If this is done reasonably promptly then I can have a bash at testing the new version before I finish working here. After that, I don't know what I will do, but it will probably fall to the next maintainer.
Hi
If you're interested, I've written some CMakelists and cmake module in order to compile lag && lidarquatree.
Nicolas David