Looking for dev workflow tips: testing, debugging, profiling, editor

You need to build OpenSSL as well, make sure it’s built and libssl.a and libcrypto.a are in " /c/src/BloodbatRack/Rack/dep/lib "

OpenSSL installs by default in lib64; but that’s taken care of here:

ifdef ARCH_WIN

cd openssl-3.3.1 && ./config --prefix="$(DEP_PATH)" --libdir=lib no-shared no-hw threads no-zlib no-capieng no-pinshared $(CFLAGS)

endif

The --libdir=lib part

It looks like openssl installed earlier in the build:

...
install ./include/openssl/uierr.h -> /c/src/BloodbatRack/Rack/dep/include/openssl/uierr.h
install ./include/openssl/whrlpool.h -> /c/src/BloodbatRack/Rack/dep/include/openssl/whrlpool.h
install ./include/openssl/x509.h -> /c/src/BloodbatRack/Rack/dep/include/openssl/x509.h
install ./include/openssl/x509_vfy.h -> /c/src/BloodbatRack/Rack/dep/include/openssl/x509_vfy.h
install ./include/openssl/x509err.h -> /c/src/BloodbatRack/Rack/dep/include/openssl/x509err.h
install ./include/openssl/x509v3.h -> /c/src/BloodbatRack/Rack/dep/include/openssl/x509v3.h
install ./include/openssl/x509v3err.h -> /c/src/BloodbatRack/Rack/dep/include/openssl/x509v3err.h
install libcrypto.a -> /c/src/BloodbatRack/Rack/dep/lib/libcrypto.a
install libssl.a -> /c/src/BloodbatRack/Rack/dep/lib/libssl.a
...

I see both libssl.a and libcrypto.a in that folder.

Hmm… what happens when you run the following from

/c/src/BloodbatRack/Rack/dep

make lib/libcurl.a

You can add -jn where n is the number of threads to use.

Same error:

$ make lib/libcurl.a -j8
cd curl-8.9.1 && PKG_CONFIG_PATH= ./configure --prefix="/c/src/BloodbatRack/Rack/dep" --disable-symbol-hiding --enable-shared=no --enable-http --disable-ftp --disable-file --disable-ldap --disable-ldaps --disable-rtsp --enable-proxy --disable-dict --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smb --disable-smtp --disable-gopher --disable-mqtt --disable-manual --enable-threaded-resolver --enable-pthreads --enable-verbose --disable-sspi --disable-ntlm --disable-ntlm-wb --disable-tls-srp --disable-unix-sockets --disable-doh --disable-mime --disable-dateparse --disable-netrc --disable-progress-meter --disable-alt-svc --without-hyper --without-zlib --without-brotli --without-zstd --without-libpsl --without-libgsasl --without-libssh2 --without-librtmp --without-winidn --without-libidn2 --without-nghttp2 --without-ngtcp2 --without-nghttp3 --without-quiche --with-ssl="/c/src/BloodbatRack/Rack/dep"
configure: WARNING: unrecognized options: --disable-ntlm-wb
configure: loading site script /etc/config.site
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... no
checking whether to enable c-ares for DNS lookups... no
checking whether to disable dependency on -lrt... (assumed no)
checking whether to enable HTTPSRR support... no
checking whether to enable ECH support... no
checking for path separator... :
checking for sed... /usr/bin/sed
checking for grep... /usr/bin/grep
checking that grep -E works... yes
checking for ar... /mingw64/bin/ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for stdatomic.h... yes
checking if _Atomic is available... yes
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for code coverage support... no
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking curl version... 8.9.1
checking for httpd... no
checking for apache2... no
checking for apachectl... no
checking for apxs... no
configure: httpd/apache2 not in PATH, http tests disabled
configure: apxs not in PATH, http tests disabled
checking for nghttpx... no
checking for caddy... /usr/bin/caddy
checking build system type... x86_64-w64-mingw32
checking host system type... x86_64-w64-mingw32
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking if OS is AIX (to define _ALL_SOURCE)... no
checking if _THREAD_SAFE is already defined... no
checking if _THREAD_SAFE is actually needed... no
checking if _THREAD_SAFE is onwards defined... no
checking if _REENTRANT is already defined... yes
checking if _REENTRANT is onwards defined... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe
checking if the linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /mingw64/bin/nm -B
checking the name lister (/mingw64/bin/nm -B) interface... BSD nm
checking whether ln -s works... no, using cp -pR
checking the maximum length of command line arguments... 8192
checking how to convert x86_64-w64-mingw32 file names to x86_64-w64-mingw32 format... func_convert_file_msys_to_w32
checking how to convert x86_64-w64-mingw32 file names to toolchain format... func_convert_file_msys_to_w32
checking for C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /mingw64/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... no
checking for as... as
checking for dlltool... (cached) dlltool
checking for objdump... (cached) objdump
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking whether to build shared libraries with -version-info... yes
checking whether to build shared libraries with -no-undefined... yes
checking whether to build shared libraries with -mimpure-text... no
checking whether to build shared libraries with PIC... yes
checking whether to build static libraries with PIC... no
checking whether to build shared libraries only... no
checking whether to build static libraries only... yes
checking for windres... windres
checking if cpp -P is needed... yes
checking if cpp -P works... yes
checking if compiler is DEC/Compaq/HP C... no
checking if compiler is HP-UX C... no
checking if compiler is IBM C... no
checking if compiler is Intel C... no
checking if compiler is clang... no
checking if compiler is GNU C... yes
checking compiler version... gcc '1402' (raw: '14.2.0')
checking if compiler is SunPro C... no
checking if compiler is Tiny C... no
checking whether build target is a native Windows one... yes
checking if compiler accepts some basic options... yes
configure: compiler options added: -Werror-implicit-function-declaration
checking if compiler optimizer assumed setting might be used... no
checking if compiler accepts strict warning options... yes
configure: compiler options added: -Wno-system-headers
checking if compiler halts on compilation errors... yes
checking if compiler halts on negative sized arrays... yes
checking if compiler halts on function prototype mismatch... yes
checking if compiler supports hiding library internal symbols... yes
checking whether build target supports WIN32 file API... yes (large file enabled)
checking whether build target supports WIN32 crypto API... yes
checking for good-to-use Darwin CFLAGS... no
checking whether to support http... yes
checking whether to support ftp... no
checking whether to support file... no
checking whether to support ldap... no
checking whether to support ldaps... no
checking whether to support rtsp... no
checking whether to support proxies... yes
checking whether to support dict... no
checking whether to support telnet... no
checking whether to support tftp... no
checking whether to support pop3... no
checking whether to support imap... no
checking whether to support smb... no
checking whether to support smtp... no
checking whether to support gopher... no
checking whether to support mqtt... no
checking whether to provide built-in manual... no
checking whether to build documentation... yes
checking whether to enable generation of C code... yes
checking whether to use libgcc... no
checking if X/Open network library is required... no
checking for gethostbyname... no
checking for gethostbyname in -lnsl... no
checking for gethostbyname in -lsocket... no
checking for gethostbyname in -lwatt... no
checking for gethostbyname with both nsl and socket libs... no
checking for gethostbyname in -lws2_32... yes
checking whether build target is a native Windows one... (cached) yes
checking for proto/bsdsocket.h... no
checking for connect in libraries... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... yes
checking for monotonic clock_gettime... yes
checking for clock_gettime in libraries... no additional lib required
checking if monotonic clock_gettime works... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for raw monotonic clock_gettime... no
configure: WARNING: zlib disabled
checking whether to enable IPv6... yes
checking if struct sockaddr_in6 has sin6_scope_id member... yes
checking if argv can be written to... no
checking if GSS-API support is requested... no
checking whether to enable Windows native SSL/TLS... no
checking whether to enable Secure Transport... no
checking whether to enable Amiga native SSL/TLS (AmiSSL v5)... no
checking for gdi32... yes
configure: PKG_CONFIG_LIBDIR will be set to "/c/src/BloodbatRack/Rack/dep/lib/pkgconfig"
checking for pkg-config... /mingw64/bin/pkg-config
checking for openssl options with pkg-config... found
configure: pkg-config: SSL_LIBS: "-lssl -lcrypto"
configure: pkg-config: SSL_LDFLAGS: "-L/c/src/BloodbatRack/Rack/dep/lib"
configure: pkg-config: SSL_CPPFLAGS: "-I/c/src/BloodbatRack/Rack/dep/include"
checking for HMAC_Update in -lcrypto... no
checking for HMAC_Init_ex in -lcrypto... no
checking OpenSSL linking with -ldl... no
checking OpenSSL linking with -ldl and -lpthread... no
checking for SSL_set_quic_use_legacy_codepoint... no
configure: OpenSSL version does not speak QUIC API
configure: OPT_OPENSSL: /c/src/BloodbatRack/Rack/dep
configure: OPENSSL_ENABLED:
configure: error: --with-openssl was given but OpenSSL could not be detected
make: *** [Makefile:148: lib/libcurl.a] Error 1

What are the contents of

/c/src/BloodbatRack/Rack/dep/lib/pkgconfig

It contains glew.pc, glfw3.pc, jansson.pc,

libcrypto.pc

libdir=/c/src/BloodbatRack/Rack/dep/lib
includedir=/c/src/BloodbatRack/Rack/dep/include
enginesdir=/c/src/BloodbatRack/Rack/dep/lib/engines-3
modulesdir=/c/src/BloodbatRack/Rack/dep/lib/ossl-modules

Name: OpenSSL-libcrypto
Description: OpenSSL cryptography library
Version: 3.3.1
Libs: -L${libdir} -lcrypto
Libs.private: -lws2_32 -lgdi32 -lcrypt32
Cflags: -I${includedir}

libssl.pc

libdir=/c/src/BloodbatRack/Rack/dep/lib
includedir=/c/src/BloodbatRack/Rack/dep/include

Name: OpenSSL-libssl
Description: Secure Sockets Layer and cryptography libraries
Version: 3.3.1
Requires.private: libcrypto
Libs: -L${libdir} -lssl
Cflags: -I${includedir}

and openssl.pc

libdir=/c/src/BloodbatRack/Rack/dep/lib
includedir=/c/src/BloodbatRack/Rack/dep/include

Name: OpenSSL
Description: Secure Sockets Layer and cryptography libraries and tools
Version: 3.3.1
Requires: libssl libcrypto

If you want to keep trying stuff to get your branch working on my system, I am willing, but I don’t really need to get it working anymore because I now have Rack building and running in WSL. It looks like everything works there without issues, and there are no mysterious SIGTRAPS happening in the debugger. I think I’ll just do my development in WSL to avoid all the broken stuff on Windows native.

I’m glad you got it working :). I can see why the problem happens (libcurl configure under MinGW fails to detect existing openssl dependency · Issue #4582 · curl/curl · GitHub), and Curl’s unwillingness to fix it :S. It is fixable; but the Windows build problem is something Rack devs should address :S.