Comments (10)
@BergWerkGIS - thanks for posting the linking errors. I think you are very close to this working. My sense is that this is happening because the GDAL you have built has ODBC enabled and so it needs to be linked again when being linked by gdal.node. So does this fix it?
diff --git a/binding.gyp b/binding.gyp
index 8c58792..a89d4e5 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -64,6 +64,8 @@
"libraries": [
'<!@(find <(shar
"-lws2_32.lib"
+ "-lodbccp32.lib"
+ "-lodbc32.lib"
],
"include_dirs": [
"deps/libgdal/ar
from node-gdal.
One step further, new error:
libpq.lib(fe-connect.obj) : error LNK2001: unresolved external symbol __imp__FreeCredentialsHandle@4 [C:\projects\node-gdal\build \gdal.vcxproj]
libpq.lib(fe-connect.obj) : error LNK2001: unresolved external symbol __imp__DeleteSecurityContext@4 [C:\projects\node-gdal\build \gdal.vcxproj]
libpq.lib(fe-auth.obj) : error LNK2001: unresolved external symbol _AcquireCredentialsHandleA@36 [C:\projects\node-gdal\build\gda l.vcxproj]
libpq.lib(fe-auth.obj) : error LNK2001: unresolved external symbol _InitializeSecurityContextA@48 [C:\projects\node-gdal\build\gd al.vcxproj]
libpq.lib(fe-auth.obj) : error LNK2001: unresolved external symbol _FreeContextBuffer@4 [C:\projects\node-gdal\build\gdal.vcxproj ]
C:\projects\node-gdal\build\Release\gdal.node : fatal error LNK1120: 5 unresolved externals [C:\projects\node-gdal\build\gdal.vcx proj]
from node-gdal.
Yeah!
node-gdal
compiles with the output of build-gdal
: 336 passing tests.
Had to add the odbcs libs mentioned above and "-lsecur32.lib"
to binding.gyp and copy libexpat.dll
to the binding dir.
@springmeyer
I don't know if this is desirable behavior.
When running npm test
without libexpat.dll
in the binding directory, the following happened, and all tests were successfull:
I think this is pretty easy to miss if you are just looking at the results of the tests and one might think the build was successful when in reality is wasn't.
Especially during automation.
Is there a switch to npm test
to prevent this behaviour?
from node-gdal.
@BergWerkGIS - great work on getting this working!
Good catch on the npm test
oddity. That is not good but understandable. It is happening because of this pretest
line:
Line 44 in 24233ef
devDependencies
are installed before running the tests. Unfortuntely npm appears to also trigger an install of the node-gdal module as well and that is why node-pre-gyp is triggered. Because node-pre-gyp
is being called with --fallback-to-build
that then triggers a re-install from the remote binary :(.
I think the simplest solution here is to remove that pretest
line and just expect that developers will have those dependencies correctly installed after the first npm install
.
from node-gdal.
pre-test fix at #55
@BergWerkGIS - can you queue up a new pull request with the library linking fixes?
from node-gdal.
Concerning changes to binding.gyp
see 836c6e7
from node-gdal.
@BergWerkGIS - can you summarize big picture were we are at with using an external gdal for the build for windows? What are the next actions you see?
from node-gdal.
It is possible to use an external gdal for the build, see:
appveyor.yml
binding.gyp
Although I was not able to get node-gdal
compile with a version built by build-gdal
or mapnik-dependencies
.
I made it work like this:
- compiled node-gdal without external binaries
- packaged the resulting libs and uploaded them to S3
- referenced uploaded package for appveyor
Next actions as I see them:
- analyze why node-gdal doesn't work with the libs, that have been created via the scripts that come with gdal itself. I'm not sure if I'm the right person to do this, as I'm not familiar with the ins and outs of building gdal. Maybe I would need just a few hints on where to start.
- make node-gdal work with libs from other compiles
- dump
build-gdal
and building of gdal within node-gdal and only use gdal frommapnik-dependencies
. So we have only one build script to maintain and not three
from node-gdal.
Awesome, thanks for the overview.
compiled node-gdal without external binaries
By this you mean that you grabbed the libgdal/etc that resulted from the npm install
here and then repackaged it? Clever, I missed that previously :)
analyze why node-gdal doesn't work with the libs
Okay, I'm sure we can figure this out together - perhaps an iss of what GDAL drivers are built vs what GDAL drivers node-gdal expects are available.
dump build-gdal and building of gdal within node-gdal and only use gdal from mapnik-dependencies. So we have only one build script to maintain and not three
👍 And of course I need to follow through on my mason dreams/promises, but until then yes, sounds great to merge build-gdal -> mapnik-deps.
from node-gdal.
Closing, builds are fully done on AppVeyor now.
from node-gdal.
Related Issues (20)
- Can't open MVT for write
- gdal.Driver.create's parameter: data_type which need Integer(number) , however , Constants (GDT) : gdal.GDT_* provide string HOT 4
- Using node-gdal in electron HOT 4
- This its under other libs and can't even compile because node-pre-gyp ERROR
- DGN driver
- Node.js 14 HOT 3
- converting
- Node 16 binaries on older OS (glibc version) HOT 3
- npm install not working HOT 2
- Change the AREA_OR_POINT value
- Multi process Read Error HOT 1
- Memory Usage Overflow
- Problem with Node 17
- npm install gdal --save errors on M1 mac HOT 3
- What versions of nodejs are supported?
- Example of resolving GPS lat/long to elevation from a WGS84 TIFF HOT 15
- Get altitude/elevation from GPS coordinates HOT 1
- Add support for node 18
- Is there any release for arm64?
- failed npm install gdal HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-gdal.