Comments (5)
I have found the objdump -tT
which find many symbols including the needed pg_query_parse
, but none exported in the dynamic table.
from flexdll.
Lack of time I'm afraid means that FlexDLL issues can be very long-burning - please do try to include full reproductions with issues (i.e. concrete links to branches and instructions to build them) so that when we do get spare minutes to have a look, they're not all spent just trying to reproduce the issue!
This is possibly a shot in the dark, but this is ringing a bell with symbols not being properly available because they're not being referenced - @jonahbeckford, does this look like a familiar type of failure?
from flexdll.
Ah - ocaml/ocaml#12412 was what I was thinking of, but that's MSVC and I don't think should be applying here (assuming you're using mingw-w64).
from flexdll.
As David asked, are you compiling with MSVC or GCC?
Either way, pasting in the first 10 lines of ocamlobjinfo pg_check.cmxa
may help. (Or .cma
if you created a bytecode executable)
from flexdll.
I am trying with Cygwin/MinGW. (On MSVC, even a simple (run %{make} build)
is troublesome: not found) Instead of the whole pg_query, I propose this tiny project which spots the actual issue.
https://github.com/F-Loyer/ctype_error
On Windows, there are 2 symbol tables the (normal) SYMBOL TABLE and the DYNAMIC SYMBOL TABLE. By default the linker put symbols only in the SYMBOL TABLE, the DYNAMIC SYMBOL TABLE remains empty. However, the ffi library searches symbols in this latest table. Then, this can't work.
See https://github.com/F-Loyer/ctype_error/blob/main/main_objdump.txt#L10406 The function my_function
is present, but not in the right table and FFI can't see it.
I have managed to solve the issue with the executable link flags of dune (the commented line in the project), with:
(link_flags -cclib -Wl,-Wl,--export-all-symbols)
I guess the default configuration should work without this tweak. (Note, I had to double the -Wl
... perhaps one is eaten by gcc, the other by FlexDll or something like this).
Note: the ffi-7.dll
I use comes from a Gtk installation from sources. I don't know if there is an official version I should prefer. EDIT: Same issue with a ffi-8.dll
from vcpkg
.
(Since pg_check
and my project are executable - not libraries - no cmxa
, but the issue is not there I think)
Note, the external __my_function__ : unit -> unit = "my_function"
is to for the given function to be linked... the linker links all *.o, but select from an *.a what seems to be (statically) used.
from flexdll.
Related Issues (20)
- Cannot relocate on OCaml 4.13.1 [Windows] HOT 1
- Implementing a less memory intensive read function HOT 9
- Temporary files not deleted on exit HOT 3
- Generate import library for exported function of the main executable file HOT 5
- findlib sometimes cannot be built on Windows HOT 3
- Support for /alternatename: linker directive needed for x86 HOT 2
- Fix parallel access to global symbol structures
- flexlink: simplify static linking with libstdc++
- Upgrade from msvcrt.lib to ucrt.lib HOT 6
- ** Fatal error: Cannot parse directive: -exclude-symbols:__alloca
- Compile ERROR with MSVC VS2019 HOT 3
- Conditionally link with gcc_eh
- MSYS2/ucrt64 support HOT 2
- [Question] How does Flexdll handling name mangling HOT 2
- Would a pull request allowing "__nm_" prefixes be accepted? HOT 4
- flexlink should cygpath %TEMP% before passing to bash HOT 1
- Issue with link order of archive files specified twice on the command line HOT 11
- "Cannot relocate" error with flexdll in OCaml for Windows 4.11 (and older versions) HOT 8
- `-print-search-dirs` may return `;`-delimited mixed paths on MSYS2 HOT 9
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 flexdll.