Help compiling mdadm 4.2 for static binary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux