Closed kevinstadler closed 4 years ago
The
Segmentation fault: 11
on OSX appears to be related to the following note from the LuaJIT installation page:If you're building a 64 bit application on OSX which links directly or indirectly against LuaJIT, you need to link your main executable with these flags:
-pagezero_size 10000 -image_base 100000000
The straightforward solution seems to be to add these two build parameters around here in the
osm2pgsql
Formula:
Can you see if this works for you by making the change to the formula and then running brew install -s osm2pgsql
? If it does, can you open a pull request that:
This documentation will help you get started and I'm happy to help if you have any questions.
Unfortunately I've never worked with cmake
before so I wouldn't know where (or how) exactly to make the required changes (or how to test them)...
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew gist-logs <formula>
(where<formula>
is the name of the formula that failed) and included the output link?brew gist-logs
didn't work: ranbrew config
andbrew doctor
and included their output with your issue?What you were trying to do (and why)
I've already been using
osm2pgsql
(latest1.2.1_1
) successfully for a while, and now wanted to make use of its optional Lua tag transformation feature, but (like the user in #52193 before me) I get aSegmentation fault: 11
whenever I run the binary with the--tag-transform-script
argument.What happened (include command output)
Proposed solution/fix
The
Segmentation fault: 11
on OSX appears to be related to the following note from the LuaJIT installation page:The straightforward solution seems to be to add these two build parameters around here in the
osm2pgsql
Formula:https://github.com/Homebrew/homebrew-core/blob/eeb6b62cbfaec7db8aab0d781ee8ec3f93cf4152/Formula/osm2pgsql.rb#L35-L38
What you expected to happen
osm2pgsql
should import the data to my PostGIS database, first passing it through its Lua tag transformation feature.Step-by-step reproduction instructions (by running
brew install
commands)brew install osm2pgsql
In order to come to the part of the binary that segfaults you will need to set up a PostGIS database first, but note that this issue was previously reported in #52193 so it is definitely reproducible.
Result:
osm2pgsql yourimportfile.osm
does not segfault, successfully imports to PostGISosm2pgsql --tag-transform-script style.lua myimportfile.osm
segfaultsbrew config
output