Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3308 closed defect (fixed)

Having issue running the gui loader / dumper on my computer

Reported by: robe Owned by: robe
Priority: low Milestone: PostGIS 2.2.0
Component: utils/loader-dumper Version: master
Keywords: Cc:

Description

I was trying to use the postgis gui build genrated by winnie and am getting some sort of memory exception error.

What's somewhat odd is winnie's gui tests pass — so might be something specific about my pc.

Old 2.1 loader works fine though. New loader has a dependency on SFCGAL and lwgeom.dll.

pramsey, you build the gui loader too right? Can you verify yours is working.

Attachments (2)

gui_loader_dep_218.png (8.6 KB ) - added by robe 9 years ago.
before
gui_loader_dep_220rc`.png (14.8 KB ) - added by robe 9 years ago.
after

Download all attachments as: .zip

Change History (10)

comment:1 by robe, 9 years ago

I should add, I can't launch it at all. It crashes immediately before the window opens.

comment:2 by robe, 9 years ago

Okay this may be a false alarm, but I want to track the issue down before I close this. I was able to get the dialog to load and even import a file by launching from a batch script with environment path controlled. So it most be getting a bad or invalid version dll from somewhere.

comment:3 by robe, 9 years ago

Okay this should be fixed ar r14173.

I looked at dependency walker to see what changed between the 2.1.8 version and 2.2.0 and shp2pgsql-gui now relies on the kitchen sink to just sit there and look pretty where as the kitchen sink was not needed before.

Observe the gorgeous before and after pictures.

Simple 2.1.8

before

Our new 2.2.0

after

It would be really nice if I could ditch this extra baggage as shp2pgsql-gui is not using it for anything.

Last edited 9 years ago by robe (previous) (diff)

by robe, 9 years ago

Attachment: gui_loader_dep_218.png added

before

by robe, 9 years ago

Attachment: gui_loader_dep_220rc`.png added

after

comment:4 by robe, 9 years ago

Priority: blockerlow
Resolution: fixed
Status: newclosed

I'll close this for now since I have a working but inelegant solution for it.

I know before liblwgeom was compiled into shp2pgsql-gui since the 2.1.8 is 1 MB and the 2.2.0 is 0.5 MB.

However the others I think were left out, so how was I able to get away without a geos dependency before? geos alone is 2.5MB so that can't be embedded in the file and proj is another 350kb (liblwgeom by itsel is 473 kb)

comment:5 by strk, 9 years ago

When you link statically you only depend on what you really use. Not using GEOS depending methods, you didn't have that dependency. The solution to this might be further splitting liblwgeom into core and wrappers…

comment:6 by strk, 9 years ago

Note that those dependencies are not dependencies of shp2pgsql-gui itself, but of liblwgeom. The shp2pgsql-gui executable dependencies are as follows:

[strk@cdb:/usr/src/postgis/postgis/loader(svn-trunk)] objdump -x .libs/shp2pgsql-gui | grep NEEDED
  NEEDED               liblwgeom-2.2.so.2
  NEEDED               libgtk-x11-2.0.so.0
  NEEDED               libgobject-2.0.so.0
  NEEDED               libglib-2.0.so.0
  NEEDED               libc.so.6
  NEEDED               libpq.so.5

I guess shp2pgsql only uses the WKB/WKT input output routines (liblwgeom_ogcformats.so?)

comment:7 by robe, 9 years ago

hmm okay I'll live with this (or just patch my local liblwgeom make to get rid of this line

LDFLAGS += -no-undefined

So I can have my static linking back. Hey Debian patches our code already I can patch in the reverse direction. Ideally it would be really nice if we can make this whole static linking / dynamic linking a configuration switch.

splitting liblwgeom further apart sounds even more annoying than this problem and will only make pramsey more rabid :).

comment:8 by robe, 9 years ago

okay patched winnie's build scripts to patch the generated Makefile and reverted my copying of sfcgal and CGAL at r14174.

I still don't understand why there is still a dependency on libproj and geos where as in 2.1.8 I didn't have that.

Note: See TracTickets for help on using tickets.