Linux-Raid Archives mirror
 help / color / mirror / Atom feed
From: Stephen Haran <steveharan@gmail.com>
To: linux-raid@vger.kernel.org
Subject: Help compiling mdadm 4.2 for static binary
Date: Mon, 29 Jan 2024 14:37:09 -0500	[thread overview]
Message-ID: <CAKcp_7a7tw-oheF8E_KtYjv6kmFTG3AMkX=UEQWuFGFV4SkaAA@mail.gmail.com> (raw)

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

             reply	other threads:[~2024-01-29 19:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 19:37 Stephen Haran [this message]
2024-01-30 12:50 ` Help compiling mdadm 4.2 for static binary Mariusz Tkaczyk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKcp_7a7tw-oheF8E_KtYjv6kmFTG3AMkX=UEQWuFGFV4SkaAA@mail.gmail.com' \
    --to=steveharan@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).