Opened 10 years ago
Closed 10 years ago
#3003 closed defect (fixed)
Will just not compile anymore on FreeBSD 10.1
Reported by: | martin5519 | Owned by: | pramsey |
---|---|---|---|
Priority: | blocker | Milestone: | PostGIS 2.1.5 |
Component: | postgis | Version: | 2.1.x |
Keywords: | Cc: | erica.ramsey@…, dru.lavigne@…, trevor@… |
Description
I've tried everything. I have a bug open at:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195090
We've been developing software with Postgis as a module and had zero problems before. Since almost 2 weeks now, we've been unable to reinstall following two hard drive crashes. I've tried 2 different FreeBSD ports and I've tried compiling from source with 2.0.6 and 2.1.4. In the ports version, I've even fixed 2 errors (undeclared json_tokener variable and link to json/json.h should be json-c/json.h).
Anyhow, I know it's a free module and it's terrific but I'm just getting really frustrated. I'm even offering to pay or donate - will someone, PLEASE help me.. tell me your hourly rate, just log into my system and see.
At first I thought it was a FreeBSD port problem (well, it has been as well) but I'm having issues from Source as well. I have the EXACT version of all dependencies install required. Whether it's me or it's a valid issue, I really need some help here. The error is always the same (port or from source):
Makefile:103: recipe for target 'shp2pgsql' failed gmake[2]: * [shp2pgsql] Error 1 gmake[2]: Leaving directory '/usr/home/martin/postgis-2.0.6/loader' GNUmakefile:14: recipe for target 'all' failed gmake[1]: * [all] Error 1 gmake[1]: Leaving directory '/usr/home/martin/postgis-2.0.6' * Error code 2
Worse part is I don't even need shp2pgsql but I can't seem to remove it as an option. Martin
p.s. I have not tried 2.1.5..
Attachments (2)
Change History (23)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
P.S from your pastebin, looks like you are using 2.1.3. I would suggest compiling against 2.1.4. There were some issues with 2.1.3 on freebsd which were fixed in 2.1.4. Again those were on the raster compile stage so probably not what you are experiencing here.
comment:3 by , 10 years ago
Ok, I'll try reinstalling iconv and try resintalling geos from port! Thank you - and either way, please tell me how I can donate to you guys.. pay you! :) I'll try that first right now and get back to you. I did a make deinstall, make clean and make rmconfig on /usr/ports/graphics/geos and now I removed the entire geos directory and re-downloading and entire ports tree to get any fix for the geos port.
comment:4 by , 10 years ago
Ok, here's the Pastebins. I believe in open source but it's hard for me to contribute as I am not a programmer. Therefore let me know anything I can do to contribute here.
Make install clean from port version 21
From Source Version 2.1.4 - CONFIGURE:
From Source Version 2.1.4 - MAKE
After having done these above, I tried the following:
root@database:~martin/postgis-2.1.4/liblwgeom # cd .libs root@database:~martin/postgis-2.1.4/liblwgeom/.libs # ls liblwgeom.a liblwgeom.la liblwgeom.lai root@database:~martin/postgis-2.1.4/liblwgeom/.libs # cd .. root@database:~martin/postgis-2.1.4/liblwgeom # cp -r libs libs.back root@database:~martin/postgis-2.1.4/liblwgeom # cd .libs root@database:~martin/postgis-2.1.4/liblwgeom/.libs # rm -rf *
Then I tried a make clean and make from source again - same output as above from what I can see: http://pastebin.com/LHfTHxJV - from source.
Martin
comment:6 by , 10 years ago
The terminal error is
/usr/bin/ld: //lib/libm.so.5: invalid DSO for symbol `cos@@FBSD_1.0' definition //lib/libm.so.5: could not read symbols: Bad value
Which is a weird one, it looks like it actually finds libm but then cannot read it. I lean towards blaming your libm, actually, is it corrupt or something?
comment:7 by , 10 years ago
I found this which suggests you might have a mixup with 32-bit and 64-bit libraries: http://stackoverflow.com/questions/9934549/very-strange-linker-behavior
some suggestions from it
export LDFLAGS="$LDFLAGS -lm"
or something like
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
before configure and make might help. your paths are probably different since you are on freebsd so you might need to play with the paths a bit
comment:8 by , 10 years ago
I'll look at the paths issue - that came up before and I had tried to modify the paths.
I did not have iconv installed but I did have libiconv installed. I have iconv installed now as well (no difference):
root@database:~martin/postgis-2.1.4 # whereis iconv iconv: /usr/bin/iconv /usr/share/man/man1/iconv.1.gz /usr/ports/converters/iconv root@database:~martin/postgis-2.1.4 # pkg info | grep iconv iconv-2.0_4 Charset conversion library and utilities libiconv-1.14_4 Character set conversion library
I googled that error you're concerned about - I found the following:
Sep 23, 2014; 8:15pm
Re: lib/libm.so.5: could not read symbols: Bad value and /usr/bin/ld: : invalid DSO for symbol `sin@@FBSD_1.0' definition Justin Hibbits-2 234 posts Actually it's an issue with the port. The toolchain guys made ld more strict, requiring all libraries to be specified on the command line, rather than following the DT_NEEDED links. There is a whole host of ports that have the problem of missing -lm. Some have been fixed, but many more remain.
- Justin
So, I suspect this should be fixed first and foremost? Your thoughts?
comment:9 by , 10 years ago
martin,
libm as ,pramsey said, is definitely one of the holding blocks. the iconvs are just warnings so may be harmless.
So since its failing at the linker phase for libm. libm is something you have to fix before you can continue.
comment:10 by , 10 years ago
Ok, I will start with that - now can I contribute here in some way? PAypal? Bitcoin?
comment:11 by , 10 years ago
Let's worry about that after your problem is resolved :) You can donate to OSGEO which does provide us hosting and other goodies. http://www.osgeo.org/sponsorship
We aren't setup to take direct funding (though its been discussed but takes someone dedicated to managing that). Of course you can ask for consulting directly from PostGIS core developer companies - listed here: http://postgis.net/support (I'm from Paragon Corporation, but we don't know much about FreeBSD so wouldn't feel right offering our services as an expert)
comment:12 by , 10 years ago
hi - I built a FreeBSD VM
$ uname -a FreeBSD bsdtext 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
brought gmake, gdal and GEOS in via package, built Proj4 4.8 from source, and PostGIS 2.1x
svn co http://svn.osgeo.org/postgis/branches/2.1 postgis_21
see attachment for output
by , 10 years ago
Attachment: | bsd_build_1.txt added |
---|
comment:13 by , 10 years ago
Well, I'm not expert and your issue is different than mine but for yours, look at this:
cp ../../doc/tiger_geocoder_comments.sql sql_bits/tiger_geocoder_comments.sql 388 cp: ../../doc/tiger_geocoder_comments.sql: No such file or directory 389 Makefile:132: recipe for target 'sql_bits/tiger_geocoder_comments.sql' failed 390 gmake[3]: * [sql_bits/tiger_geocoder_comments.sql] Error 1
Seems like a file is missing from source? But why the issue just on FreeBSD?
comment:14 by , 10 years ago
It's not just on freebsd, I hit this last week on Centos. The build seems to have been tweaked and bits of doco (the comments SQL) are not being cleaned on make clean, nor generated on make all. The result for folks who have them already built is... bliss. For those with fresh trees, it's this breakage. @robe?!?!
comment:15 by , 10 years ago
Well, I hope you're right... seems like my issue is different:
usr/bin/ld: lib/libm.so.5: invalid DSO for symbol `cos@@FBSD_1.0' definition lib/libm.so.5: could not read symbols: Bad value
But if this is all related, great! I also opened a case on Stackoverflow:
I know it's killing me - I am SO glad we're not live with our project yet - it would have been a disaster - decided to purchase FreeNAS to prevent serious hardware failures for the future. But for now, we're frozen on our project until we can get Postgis installed again successfully.
Martin
comment:16 by , 10 years ago
Priority: | high → blocker |
---|
Guys sorry I'm late to the party on this one. I'll recheck the 2.1.4 by testing on a fresh PostgreSQL build and seeing if I run into the same issues. But from darkblueb's tree it looks like all comment generation is failing too?
http://trac.osgeo.org/postgis/attachment/ticket/3003/bsd_build_0.txt
I'm not quite sure what to make of:
make: "/usr/home/dbb/src/postgis_21/doc/Makefile" line 30: Missing dependency operator
in http://trac.osgeo.org/postgis/attachment/ticket/3003/bsd_build_1.txt
comment:17 by , 10 years ago
Bah I thin the comment issue may be the same as what Nicklas ran into here:
http://lists.osgeo.org/pipermail/postgis-devel/2014-September/024549.html
which strk fixed in r13012
http://lists.osgeo.org/pipermail/postgis-devel/2014-September/024552.html
and PostGIS 2.1.4 was at r12966
So it's quite possible the comments issue existed in 2.1.4 and I missed it because I don't have a clean install.
That would also explain why on my Ubuntu I have 2.1.4 but it seems to be using the 2.1.3 scripts. Anyway as Martin says his issue is different and he'll eventually run into this one once he fixes his libm issue. I'll ticket as a separate ticket.
If it is indeed an issue -- we need to rush out a 2.1.5 before PostgreSQL 9.4 hits release (and they are at RC1) so not much time.
comment:18 by , 10 years ago
I've added another ticket at #3004 we need to make sure 2.1.5 is not affected by the install issue and patch quickly if it is. Will take me some time to test since I am working on 4 deadlines tomorrow so won't have time until Tuesday.
comment:19 by , 10 years ago
martin5519 if you can get me an account on your freebsd machine I can take a look. Drop me a note at strk@…
comment:20 by , 10 years ago
Hi All,
I've decided to build a new server (64-bit) with new WD Xe hard drives. This will also include a fresh install of FreeBSD 10.1 - not an upgrade. I had issues installing gcc as well (getting "Abort Trap, Core Dumped") so I don't know what's going on. I'm a novice level administrator - unfortunately not an expert. Hopefully this resolves my issues. I will update the ticket when it's good to go.
strk, I have your e-mail. I will definitely contact you if I run into issues - it'll take me some time - waiting for hard drives and may have to get caddies.
comment:21 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Ok, I ended up doing a fresh install on a 32-bit system (because I had the chassis) of FreeBSD 9.3. I installed Postgres 9.3 and then installed Postgis21. It went off without a hitch!
There was definitely an issue with either the upgrade from 9.1 to 10.1 or an issue with 10.1 period. Anyways, I'm glad it's working now!!
Martin
martin,
1) shp2pgsql (which is a command line) DOES NOT require GTK. Only the shp2pgsql-gui requires GTK which is the graphical interface 2) Looking at your thread on freebsd your last error:
looks like it may be caused with a mismatch with GEOS -- you might have a dangling liblwgeo.so being used that was compiled against an older geos -- happens to me on rare occasion. I would suggest deleting all of those and try recompiling.
I'm not sure if you fixed this issue:
I assume you did -- but that sounds like missing iconv package or something wrong with it.
Now whether this is a PostGIS issue, I can't absolutely rule it out. We have had some complaints from FreeBSD folks which we have fixed (but they involved compiling the raster piece). So I'm keeping this open just in case instead of redirecting you to mailing list.
Can you output what configure gives you and also the configure line you used to run configure? That seems to be missing from your paste.