Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static libraries #4

Merged
merged 22 commits into from
Jan 7, 2024
Merged

Static libraries #4

merged 22 commits into from
Jan 7, 2024

Conversation

philrz
Copy link
Contributor

@philrz philrz commented Jan 6, 2024

When inspecting a previous artifact built from this repo, @nwt spotted some dynamic library dependencies that had not been there in our v3.2.1-brim10 artifact that's been in use for years. To minimize the chance of new issues among users, this PR makes makes sure we link to the static libraries in all those cases.

Using the latest artifact built from this branch, proof is provided below that compares vs. v3.2.1-brim10.

macOS

tl;dr - The dynamic library dependencies are the same as before.

10:28:35-phil@wpm:~/Downloads/zeek-v3.2.1-brim10.darwin-amd64/zeek/bin$ otool -L zeek | sort
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 904.4.0)
	/usr/lib/libpcap.A.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)

11:13:59-phil@wpm:~/Downloads/zeek-7fbbf89.darwin-amd64/zeek/bin$ otool -L zeek | sort
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1300.36.0)
	/usr/lib/libpcap.A.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)

Windows

tl;dr - PSAPI.DLL is no longer a dependency. CRYPT32.dll is a new dependency and appears legit.

C:\Users\Phil\Downloads\zeek-v3.2.1-brim10.windows-amd64\zeek\bin>"\Program Files\Git\usr\bin\ldd.exe" zeek.exe | sort
        ADVAPI32.dll => /c/WINDOWS/System32/ADVAPI32.dll (0x7ffc6b760000)
        GDI32.dll => /c/WINDOWS/System32/GDI32.dll (0x7ffc6c480000)
        gdi32full.dll => /c/WINDOWS/System32/gdi32full.dll (0x7ffc6a8b0000)
        IPHLPAPI.DLL => /c/WINDOWS/SYSTEM32/IPHLPAPI.DLL (0x7ffc69cf0000)
        KERNEL32.DLL => /c/WINDOWS/System32/KERNEL32.DLL (0x7ffc6c550000)
        KERNELBASE.dll => /c/WINDOWS/System32/KERNELBASE.dll (0x7ffc6aba0000)
        msvcp_win.dll => /c/WINDOWS/System32/msvcp_win.dll (0x7ffc6a9d0000)
        msvcrt.dll => /c/WINDOWS/System32/msvcrt.dll (0x7ffc6b4c0000)
        ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffc6d1d0000)
        PSAPI.DLL => /c/WINDOWS/System32/PSAPI.DLL (0x7ffc6cc20000)
        RPCRT4.dll => /c/WINDOWS/System32/RPCRT4.dll (0x7ffc6cc30000)
        sechost.dll => /c/WINDOWS/System32/sechost.dll (0x7ffc6c4b0000)
        SHLWAPI.dll => /c/WINDOWS/System32/SHLWAPI.dll (0x7ffc6b560000)
        ucrtbase.dll => /c/WINDOWS/System32/ucrtbase.dll (0x7ffc6b000000)
        USER32.dll => /c/WINDOWS/System32/USER32.dll (0x7ffc6c610000)
        win32u.dll => /c/WINDOWS/System32/win32u.dll (0x7ffc6b100000)
        WS2_32.dll => /c/WINDOWS/System32/WS2_32.dll (0x7ffc6cdc0000)

C:\Users\Phil\Downloads\windows-2019\zeek-7fbbf89.windows-amd64\zeek\bin>"\Program Files\Git\usr\bin\ldd.exe" zeek.exe | sort
        ADVAPI32.dll => /c/WINDOWS/System32/ADVAPI32.dll (0x7ffc6b760000)
        CRYPT32.dll => /c/WINDOWS/System32/CRYPT32.dll (0x7ffc6aea0000)
        GDI32.dll => /c/WINDOWS/System32/GDI32.dll (0x7ffc6c480000)
        gdi32full.dll => /c/WINDOWS/System32/gdi32full.dll (0x7ffc6a8b0000)
        IPHLPAPI.DLL => /c/WINDOWS/SYSTEM32/IPHLPAPI.DLL (0x7ffc69cf0000)
        KERNEL32.DLL => /c/WINDOWS/System32/KERNEL32.DLL (0x7ffc6c550000)
        KERNELBASE.dll => /c/WINDOWS/System32/KERNELBASE.dll (0x7ffc6aba0000)
        msvcp_win.dll => /c/WINDOWS/System32/msvcp_win.dll (0x7ffc6a9d0000)
        msvcrt.dll => /c/WINDOWS/System32/msvcrt.dll (0x7ffc6b4c0000)
        ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffc6d1d0000)
        RPCRT4.dll => /c/WINDOWS/System32/RPCRT4.dll (0x7ffc6cc30000)
        sechost.dll => /c/WINDOWS/System32/sechost.dll (0x7ffc6c4b0000)
        SHLWAPI.dll => /c/WINDOWS/System32/SHLWAPI.dll (0x7ffc6b560000)
        ucrtbase.dll => /c/WINDOWS/System32/ucrtbase.dll (0x7ffc6b000000)
        USER32.dll => /c/WINDOWS/System32/USER32.dll (0x7ffc6c610000)
        win32u.dll => /c/WINDOWS/System32/win32u.dll (0x7ffc6b100000)
        WS2_32.dll => /c/WINDOWS/System32/WS2_32.dll (0x7ffc6cdc0000)        

Linux

tl;dr - The dynamic library dependencies are the same as before.

phil@phil-VirtualBox:~/zeek-v3.2.1-brim10.linux-amd64/zeek/bin$ ldd zeek  | sort
	/lib64/ld-linux-x86-64.so.2 (0x00007fdce16e0000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdcdfc1e000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fdce015c000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fdcdfe10000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fdcdfe2b000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fdce0162000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fdcdff7a000)
	linux-vdso.so.1 (0x00007ffd056e1000)

phil@phil-VirtualBox:~/zeek-7fbbf89.linux-amd64/zeek/bin$ ldd zeek | sort
	/lib64/ld-linux-x86-64.so.2 (0x00007fdb2889d000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdb26aec000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fdb2702a000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fdb26cde000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fdb26cf9000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fdb27030000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fdb26e48000)
	linux-vdso.so.1 (0x00007ffda3dcf000)

@philrz philrz self-assigned this Jan 6, 2024
@philrz philrz changed the title Static libraties Static libraries Jan 6, 2024
.github/workflows/release.yml Outdated Show resolved Hide resolved
@philrz philrz requested a review from nwt January 6, 2024 19:46
@philrz philrz marked this pull request as ready for review January 6, 2024 19:47
.github/workflows/release.yml Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
@philrz philrz merged commit 6db40ef into main Jan 7, 2024
3 checks passed
@philrz philrz deleted the static-libs branch January 7, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants