linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Help compiling mdadm 4.2 for static binary
@ 2024-01-29 19:37 Stephen Haran
  2024-01-30 12:50 ` Mariusz Tkaczyk
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Haran @ 2024-01-29 19:37 UTC (permalink / raw)
  To: linux-raid

Hello,
Compiling mdadm 4.2 from source by just running the "make" command
works fine on Ubuntu 18.04.6.

But I want a static binary so I run "make everything" but it fails.
Any idea where I'm going wrong? Thank you!

root@r-regular:~/mdadm-4.2# uname -a
Linux r-regular 5.4.0-150-generic #167~18.04.1-Ubuntu SMP Wed May 24
00:51:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

root@r-regular:~/mdadm-4.2# make everything
gcc -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
-Wimplicit-fallthrough=0 -O2 -DSendmail=\""/usr/sbin/sendmail -t"\"
-DCONFFILE=\"/etc/mdadm.conf\" -DCONFFILE2=\"/etc/mdadm/mdadm.conf\"
-DMAP_DIR=\"/run/mdadm\" -DMAP_FILE=\"map\" -DMDMON_DIR=\"/run/mdadm\"
-DFAILED_SLOTS_DIR=\"/run/mdadm/failed-slots\" -DNO_COROSYNC -DNO_DLM
  -DUSE_PTHREADS  -static -o mdadm.static mdadm.o config.o policy.o
mdstat.o  ReadMe.o uuid.o util.o maps.o lib.o Manage.o Assemble.o
Build.o Create.o Detail.o Examine.o Grow.o Monitor.o dlink.o Kill.o
Query.o Incremental.o Dump.o mdopen.o super0.o super1.o super-ddf.o
super-intel.o bitmap.o super-mbr.o super-gpt.o restripe.o sysfs.o
sha1.o mapfile.o crc32.o sg_io.o msg.o xmalloc.o platform-intel.o
probe_roms.o crc32c.o pwgr.o -ldl -ludev
util.o: In function `set_cmap_hooks':
util.c:(.text+0x4942): warning: Using 'dlopen' in statically linked
applications requires at runtime the shared libraries from the glibc
version used for linking
/usr/bin/ld: cannot find -ludev
collect2: error: ld returned 1 exit status
Makefile:199: recipe for target 'mdadm.static' failed
make: *** [mdadm.static] Error 1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-30 12:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-29 19:37 Help compiling mdadm 4.2 for static binary Stephen Haran
2024-01-30 12:50 ` Mariusz Tkaczyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).