mfbonfigli / gocesiumtiler

A Cesium.js point cloud 3D tiles generator from LAS files written in Golang
GNU Lesser General Public License v3.0
185 stars 39 forks source link

window10 go build not success #10

Closed taozywu closed 3 years ago

taozywu commented 3 years ago
  1. gcc-64: mingw64(64)、branch: decoupling_tree_data_structure
  2. go mod tidy
  3. go mod vendor
  4. go build, it will have some problems and not succeed. as follow:
PS D:\Work\GoWork\gocesiumtiler> go build                                                                               # runtime
textflag.h:1: '#' must be first item on line
# runtime/cgo
gcc_freebsd_sigaction.c:19:25: error: '_SIG_WORDS' undeclared here (not in a function); did you mean 'SIG_ERR'?
         uint32_t __bits[_SIG_WORDS];
                         ^~~~~~~~~~
                         SIG_ERR
gcc_freebsd_sigaction.c: In function 'x_cgo_sigaction':
gcc_freebsd_sigaction.c:30:19: error: storage size of 'act' isn't known
  struct sigaction act;
                   ^~~
gcc_freebsd_sigaction.c:31:19: error: storage size of 'oldact' isn't known
  struct sigaction oldact;
                   ^~~~~~
gcc_freebsd_sigaction.c:40:22: error: 'SA_SIGINFO' undeclared (first use in this function); did you mean 'SIGINT'?
   if (goact->flags & SA_SIGINFO) {
                      ^~~~~~~~~~
                      SIGINT
gcc_freebsd_sigaction.c:40:22: note: each undeclared identifier is reported only once for each function it appears in
gcc_freebsd_sigaction.c:41:37: error: unknown type name 'siginfo_t'
    act.sa_sigaction = (void(*)(int, siginfo_t*, void*))(goact->handler);
                                     ^~~~~~~~~
gcc_freebsd_sigaction.c:41:56: error: expected ';' before '(' token
    act.sa_sigaction = (void(*)(int, siginfo_t*, void*))(goact->handler);
                                                        ^
                                                        ;
gcc_freebsd_sigaction.c:45:3: error: implicit declaration of function 'sigemptyset' [-Werror=implicit-function-declaration]
   sigemptyset(&act.sa_mask);
   ^~~~~~~~~~~
gcc_freebsd_sigaction.c:48:5: error: implicit declaration of function 'sigaddset' [-Werror=implicit-function-declaration]
     sigaddset(&act.sa_mask, i+1);
     ^~~~~~~~~
gcc_freebsd_sigaction.c:54:8: error: implicit declaration of function 'sigaction'; did you mean 'x_cgo_sigaction'? [-Werror=implicit-function-declaration]
  ret = sigaction(signum, goact ? &act : NULL, oldgoact ? &oldact : NULL);
        ^~~~~~~~~
        x_cgo_sigaction
gcc_freebsd_sigaction.c:71:8: error: implicit declaration of function 'sigismember' [-Werror=implicit-function-declaration]
    if (sigismember(&oldact.sa_mask, i+1) == 1) {
        ^~~~~~~~~~~
gcc_freebsd_sigaction.c:31:19: error: unused variable 'oldact' [-Werror=unused-variable]
  struct sigaction oldact;
                   ^~~~~~
gcc_freebsd_sigaction.c:30:19: error: unused variable 'act' [-Werror=unused-variable]
  struct sigaction act;
                   ^~~
cc1.exe: all warnings being treated as errors

Looking forward to your reply!

taozywu commented 3 years ago

it's ok with linux(branch: decoupling_tree_data_structure linux: centos6.9), but it has some questions.

i use this command

./gocesiumtiler -i ./demo.las -o ./demo -e 32650 -m 1000000 -g -f -r -hq
  1. the result time is over five mintues. and i try '-m 50000', It's still slow.
  2. the pnts file is still so big.
  3. the las file (> 1G ) i want to give you, what receiver are you going to use?

    I'm still trying to do something else.

mfbonfigli commented 3 years ago
  1. Problems with pnts file size If you checked out the decoupling_tree_data_structure branch the -m flag will have no effect using the new algorithm (which is selected by default), it only works if you use one of the older algorithms. (Btw I just released the new algorithm in new revision 1.1.0, so it is already in the master and in the windows prebuilt binary, so you can check that out.)

The new algorithm can instead be tuned using the following flags:

I am working on making the algorithm smart and select these values automatically but for now they have to be specified manually. The defaults are x=5 and n=0.15 which is ok for the point cloud I am using (approximately a scan of a street 1km long with point density of 1pt every 1-2cm). I also tested it with this other dataset (https://data.melbourne.vic.gov.au/w/2dqj-9ydd/spy9-nmud?cur=O790fxGp_JG&from=G9fHGZZP2TB) and there I used x=20 and n=1 and the result was quite good to me.

  1. Problem building under Windows To be honest I don't know what the issue could be, I am not an expert of building C / C++ code, but I it may be due to the fact that we are using an old Proj4 build library. Running gcc --version on my system returns gcc (tdm64-1) 5.1.0. This is the GCC version I use on my machine and it builds, maybe you could try to install this TDM GCC compiler with the same version to match my configuration and see if that works.

  2. Providing example point cloud file You can upload it to MEGA or dropbox (or any other file sharing service) and share the link here or send me an email to m.federico.bonfigli@gmail.com if you want it to stay private. I will try to give it a look! Also please remember to provide the EPSG code of the point cloud!

taozywu commented 3 years ago

@mfbonfigli First i can try it, the parameters ('x'/'n') sound pretty good. second i will give you the point cloud file links to your email. of course I try them all myself, even though I don't know much about Go.I'm sorry to take up your time.

Thank you

taozywu commented 3 years ago

image image

That doesn't seem to be the problem here. I'm still trying. )

taozywu commented 3 years ago

@mfbonfigli

I'm sorry to have taken you so long time, I found that it was caused by the encryption software installed on my computer, and my other computer could run normally without the encryption software under window. Anyway, thanks!