linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Behrens <sbehrens@giantdisaster.de>
To: Emil Karlson <jekarlson@gmail.com>,
	Linux Btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Btrfs-progs static compile failure due to multiple uuid-tree.o in linking paratemeters
Date: Mon, 11 Nov 2013 11:26:06 +0100	[thread overview]
Message-ID: <5280B0BE.90605@giantdisaster.de> (raw)
In-Reply-To: <CAELSAVbQXyNbSpTkKjSUMzh-BYqPA-g0-AieFaG_rmpMe5vRng@mail.gmail.com>

On Sat, 9 Nov 2013 11:22:01 +0200, Emil Karlson wrote:
> Greetings
> 
> Btrfs-progs static compile fails due to multiple uuid-tree.o in
> linking paratemeters:
> 
> build error:
> gcc -g -O1 -ffunction-sections -fdata-sections -o btrfs.static
> btrfs.static.o help.static.o  cmds-subvolume.static.o
> cmds-filesystem.static.o  cmds-device.static.o  cmds-scrub.static.o
> cmds-inspect.static.o  cmds-balance.static.o  cmds-send.static.o
> cmds-receive.static.o  cmds-quota.static.o  cmds-qgroup.static.o
> cmds-replace.static.o  cmds-check.static.o  cmds-restore.static.o
> cmds-rescue.static.o  chunk-recover.static.o  super-recover.static.o \
> ctree.static.o  disk-io.static.o  radix-tree.static.o
> extent-tree.static.o  print-tree.static.o  root-tree.static.o
> dir-item.static.o  file-item.static.o  inode-item.static.o
> inode-map.static.o  extent-cache.static.o  extent_io.static.o
> volumes.static.o  utils.static.o  repair.static.o  qgroup.static.o
> raid6.static.o  free-space-cache.static.o  uuid-tree.static.o
> list_sort.static.o  send-stream.static.o  send-utils.static.o
> rbtree.static.o  btrfs-list.static.o  crc32c.static.o
> uuid-tree.static.o -static -Wl,--gc-sections -luuid -lblkid -lm -lz
> -llzo2 -L. -lpthread
> uuid-tree.static.o: In function `btrfs_lookup_uuid_subvol_item':
> /home/jkarlson/.local/repo/btrfs-progs/uuid-tree.c:94: multiple
> definition of `btrfs_lookup_uuid_subvol_item'
> uuid-tree.static.o:/home/jkarlson/.local/repo/btrfs-progs/uuid-tree.c:94:
> first defined here
> uuid-tree.static.o: In function `btrfs_lookup_uuid_received_subvol_item':
> /home/jkarlson/.local/repo/btrfs-progs/uuid-tree.c:101: multiple
> definition of `btrfs_lookup_uuid_received_subvol_item'
> uuid-tree.static.o:/home/jkarlson/.local/repo/btrfs-progs/uuid-tree.c:101:
> first defined here
> collect2: error: ld returned 1 exit status
> make: *** [btrfs.static] Error 1
> 
> 
> I have no idea what I am doing but removing uuid-tree.o from objects
> seems to help to compile btrfs-progs both as statically and
> dynamically linked binaries:

Yes, your fix is correct.

Are you going to send this fix as a git patch (git commit -s Makefile;
git format-patch -1; git send-email --to=linux-btrfs@vger.kernel.org
*.patch)?


> diff --git a/Makefile b/Makefile
> index 4e33648..4604b1f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -9,7 +9,7 @@ CFLAGS = -g -O1
>  objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \
>           root-tree.o dir-item.o file-item.o inode-item.o inode-map.o \
>           extent-cache.o extent_io.o volumes.o utils.o repair.o \
> -         qgroup.o raid6.o free-space-cache.o uuid-tree.o list_sort.o
> +         qgroup.o raid6.o free-space-cache.o list_sort.o
>  cmds_objects = cmds-subvolume.o cmds-filesystem.o cmds-device.o cmds-scrub.o \
>                cmds-inspect.o cmds-balance.o cmds-send.o cmds-receive.o \
>                cmds-quota.o cmds-qgroup.o cmds-replace.o cmds-check.o \


      reply	other threads:[~2013-11-11 10:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-09  9:22 Btrfs-progs static compile failure due to multiple uuid-tree.o in linking paratemeters Emil Karlson
2013-11-11 10:26 ` Stefan Behrens [this message]

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=5280B0BE.90605@giantdisaster.de \
    --to=sbehrens@giantdisaster.de \
    --cc=jekarlson@gmail.com \
    --cc=linux-btrfs@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 NNTP newsgroup(s).