!HEfOZuCWbFqQODrTRb:matrix.org

Xapian

10 Members
The Xapian search engine library https://xapian.org/ | GSoC https://trac.xapian.org/wiki/GSoCProjectIdeas | FAQ https://trac.xapian.org/wiki/FAQ | doc https://getting-started-with-xapian.readthedocs.io/ | If you have a question, just ask it and WAIT for a reply (there's often a delay due to timezones)2 Servers

Load older messages


SenderMessageTime
9 Apr 2024
@fastcardriver:matrix.orgfastcardriver Any idea why I am obtaining neither a .pdb file nor a .dll file? As a reminder I run these in the MSYS2 shell (with proper environment variables): 1.: $ ./configure CC="cl -nologo" CXX="$PWD/compile cl -nologo" CXXFLAGS="-EHsc" AR="lib" CPPFLAGS=-I\path\to\zlib\include LDFLAGS=-L\path\to\zlib\lib --enable-assertions 2.: make 3.: make install 09:59:44
@fastcardriver:matrix.orgfastcardriver * Any idea why I am obtaining neither a .pdb file nor a .dll file? As a reminder I run these in the MSYS2 shell (with proper environment variables):
1.: $ ./configure CC="cl -nologo" CXX="$PWD/compile cl -nologo" CXXFLAGS="-EHsc" AR="lib" CPPFLAGS=-I\path\to\zlib\include LDFLAGS=-L\path\to\zlib\lib --enable-assertions
2.: make
3.: make install
10:00:07
@fastcardriver:matrix.orgfastcardriver left the room.10:01:27
@fastcardriver:matrix.orgfastcardriver joined the room.10:47:04
@fastcardriver:matrix.orgfastcardriverI obtain a .pdb file now. The key was to modify the ./configure command: CXX="$PWD/compile cl -nologo -Zi" (The -Zi is new). For more: https://stackoverflow.com/questions/4659754/the-gs-g-option-equivalent-to-vs2010-cl-compiler13:38:03
@olly.nz:matrix.orgollyProbably better to put it in CXXFLAGS17:41:22
@olly.nz:matrix.orgollyi had a look at the DLL issue - the configure code looks right, but in CI we get:20:03:27
@olly.nz:matrix.orgolly
checking whether the /c/projects/xapian/xapian-core/compile cl -nologo linker (/usr/bin/ld) supports shared libraries... yes
[...]
checking if libtool supports shared libraries... no
20:04:14
@olly.nz:matrix.orgollythat's the appveyor build with is the oldest MSVC we support, but for some reason the GHA CI builds explicitly --disable-shared20:04:51
@olly.nz:matrix.orgollyI'll dig a bit more later, but it's not just you20:05:07
@olly.nz:matrix.orgolly fastcardriver: is the output of xapian-config --cxxflags empty for your MSVC build? 22:25:09
@olly.nz:matrix.orgolly BTW, in your configure command above, CPPFLAGS=-I\path\to\zlib\include LDFLAGS=-L\path\to\zlib\lib won't work properly 22:25:51
@olly.nz:matrix.orgolly you either need to use forward slashes / or make sure the backslashes are protected from the shell (e.g. CPPFLAGS='-I\path\to\zlib\include' LDFLAGS='-L\path\to\zlib\lib' 22:26:33
@olly.nz:matrix.orgolly otherwise the shell will take each backslash as an escape for the next character and effectively throw them away to give: CPPFLAGS=-Ipathtozlibinclude LDFLAGS=-Lpathtozliblib and those paths probably don't exist so the options won't actually do anything 22:28:29
10 Apr 2024
@olly.nz:matrix.orgolly

fastcardriver adding LD=link to the configure command helps - then we get:

checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
06:27:50
@olly.nz:matrix.orgollybut linking xapian-check.exe fails because a symbol which should be available from the xapian DLL isn't found06:28:24
@olly.nz:matrix.orgollyi wonder if it's wanting all that dllexport nonsense06:29:12
@olly.nz:matrix.orgolly the GNU toolchain has a --enable-runtime-pseudo-reloc linker option which means you don't need it, but I don't know if Microsoft have an equivalent 06:33:19
@olly.nz:matrix.orgollyif not we might be able to use the symbol visibility macros to add the dllexport and dllimport - they also mark all the externally visible symbols06:41:21
@olly.nz:matrix.orgollybut anyway, right now it seems one can't just build a DLL out of the box06:41:54
@olly.nz:matrix.orgollylibtool manual says "With Microsoft tools, Libtool digs through the object files that make up the library, looking for non-static symbols to automatically export. I.e., Libtool with Microsoft tools tries to mimic the auto-export feature of contemporary GNU tools."21:45:15
11 Apr 2024
@olly.nz:matrix.orgollyadding NM=dlltool helps - the remaining issue seems to be that libtool decides to build a static library much latter in the build when it looks at linking to zlib22:34:16
@olly.nz:matrix.orgollynot poked that much, but I wonder if it's the slightly odd naming22:34:38
15 Apr 2024
@fastcardriver:matrix.orgfastcardriverMy configure command looks like this now: $ ./configure CC="cl -nologo" CXX="$PWD/compile cl -nologo" CXXFLAGS="-EHsc -Zi" AR="lib" CPPFLAGS=-I/path/to/zlib/include LDFLAGS=-L/path/to/zlib/lib LD=link NM=dlltool 05:30:35
@fastcardriver:matrix.orgfastcardriverI still get checking if libtool supports shared libraries... no checking whether to build shared libraries... no05:30:58
@fastcardriver:matrix.orgfastcardriverxapian-config --cxxflags is empty after the configure command05:31:26
@fastcardriver:matrix.orgfastcardriver * The output of xapian-config --cxxflags is empty after the configure command05:31:36
@olly.nz:matrix.orgolly what does which link report? 05:33:09
@olly.nz:matrix.orgolly unhelpfully link is a Unix tool to create hardlinks and symlinks, so depending on PATH order LD=link might not get you the MSVC linker 05:34:23
@fastcardriver:matrix.orgfastcardriverwhich link outputs /usr/bin/link So I guess I have to find the equivalent of that for Windows05:36:38

Show newer messages


Back to Room ListRoom Version: