[64bit] openldap compilation doesn't produce shared libraries

Dr. Volker Zell vzell@volkerzell.de
Mon Jun 10 09:12:00 GMT 2013

>>>>> Volker Zell writes:

>>>>> Yaakov  writes:
    >> Following up on this, I noticed that slapd's build process is quite broken,
    >> resulting in an invalidly formatted executable.  The working method to create a
    >> linkable EXE is to just link it with
    >> -Wl,--export-all-symbols,--out-implib,libfoo.a, then link other modules with
    >> -Wl,path/to/libfoo.a.  (Relying on -L flags for in-tree paths isn't always a
    >> good idea with libtool.)

    >> I took the liberty of fixing up the build of slapd both with and without modular
    >> backends/overlays.  The patch and modified cygport(3) are in Ports git:

    >> http://cygwin-ports.git.sourceforge.net/git/gitweb.cgi?p=cygwin-ports/openldap

    > You made my day. I am struggling with this since more than a week. I
    > actually managed to get a working slapd executable but the openldap test
    > suite still doesn't run. ldapsearch always core dumps. I will check out
    > your .cygport approach and see if it makes any difference. I'll try to
    > do it on monday...

Building with your cygport file also results in ldapsearch core dumping :-(

Running with strace gives:


Exception: STATUS_ACCESS_VIOLATION at rip=004091D184A
rax=0000000000000003 rbx=0000000600042850 rcx=0000000000000000
rdx=0000000000000000 rsi=0000000000000002 rdi=0000000000000020
r8 =0000000000000000 r9 =0000000000000000 r10=0000000000230000
r11=00000004091D4D65 r12=0000000000000002 r13=0000000000000010
r14=0000000C00052930 r15=00000006000424DE
rbp=0000000000229D70 rsp=0000000000229C80
program=D:\misc\src\release64\openldap-2.4.35-1\build\clients\tools\.libs\ldapsearch.exe, pid 5512, thread main
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame        Function    Args
00000229D70  004091D184A (00000229DC0, 0000000036E, 006000424CD, 00000000374)
00000229D70  004091D22F2 (00000000000, 00000229F70, 00000229F40, 00000229E18)
00000229F40  005205B287C (00600040E60, 00000000000, 001800C0C93, 00000229F40)
00600042160  00100401DDB (0000038F194, 001802DFFDD, 00000000000, 0010040F4ED)
00000000000  0010040BD69 (0000022AB80, 00000000000, 00000000000, 00000000000)
0000022AB80  001800483AE (00000000000, 00000000000, 00000000000, 00000000000)
00000000000  0018004618B (00000000000, 00000000000, 00000000000, 00000000000)
00000000000  0018004634F (00000000000, 00000000000, 00000000000, 00000000000)
00000000000  0010040A4C1 (00000000000, 00000000000, 00000000000, 00000000000)
00000000000  00100401010 (00000000000, 00000000000, 00000000000, 00000000000)
00000000000  0007740652D (00000000000, 00000000000, 00000000000, 00077489300)
00000000000  00077AFC521 (00000000000, 00000000000, 00000000000, 00077489300)
End of stack trace

The strace output is attached.

Running under gdb doesn't work either. What am I doing wrong here ?

vzell@leila /cygdrive/d/misc/src/release64/openldap-2.4.35-1/build/tests
10:40 AM [519]> PATH=../../inst/usr/lib/debug/usr/bin:$PATH gdb ../../inst/usr/lib/debug/usr/bin/ldapsearch.exe.dbg
GNU gdb (GDB)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-cygwin".
For bug reporting instructions, please see:
Reading symbols from /cygdrive/d/misc/src/release64/openldap-2.4.35-1/inst/usr/lib/debug/usr/bin/ldapsearch.exe.dbg...done.
(gdb) run -P 3 -x -LLL -b '' -s base -h localhost -p 9011 @extensibleObject
Starting program: /cygdrive/d/misc/src/release64/openldap-2.4.35-1/inst/usr/lib/debug/usr/bin/ldapsearch.exe.dbg -P 3 -x -LLL -b '' -s base -h localhost -p 9011 @extensibleObject
Error creating process /cygdrive/d/misc/src/release64/openldap-2.4.35-1/inst/usr/lib/debug/usr/bin/ldapsearch.exe.dbg, (error 5).

    > Thanks
    >   Volker


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20130610/e888656b/attachment.ksh>

More information about the Cygwin-apps mailing list