From: Jan Schmidt <list.btrfs@jan-o-sch.net>
To: Arnd Hannemann <arnd@arndnet.de>, David Sterba <dsterba@suse.cz>
Cc: linux-btrfs@vger.kernel.org, chris.mason@oracle.com,
Sergei Trofimovich <slyfox@gentoo.org>
Subject: Re: [PATCH] Btrfs-progs: Relocate -lpthread in makefile
Date: Mon, 14 Nov 2011 16:57:08 +0100 [thread overview]
Message-ID: <4EC13A54.6050606@jan-o-sch.net> (raw)
In-Reply-To: <1321285648-16237-1-git-send-email-arnd@arndnet.de>
On 14.11.2011 16:47, Arnd Hannemann wrote:
> This patch fixes the following compile error when compiled with
> gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3):
>
> gcc -lpthread -g -O0 -o btrfs btrfs.o btrfs_cmds.o scrub.o \
> 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 crc32c.o rbtree.o extent-cache.o extent_io.o volumes.o utils.o btrfs-list.o btrfslabel.o -luuid
> scrub.o: In function `scrub_start':
> /home/arnd/Projekte/kernel/btrfs-progs/scrub.c:1342: undefined reference to `pthread_create'
> /home/arnd/Projekte/kernel/btrfs-progs/scrub.c:1360: undefined reference to `pthread_create'
> /home/arnd/Projekte/kernel/btrfs-progs/scrub.c:1374: undefined reference to `pthread_join'
> /home/arnd/Projekte/kernel/btrfs-progs/scrub.c:1430: undefined reference to `pthread_cancel'
> /home/arnd/Projekte/kernel/btrfs-progs/scrub.c:1432: undefined reference to `pthread_join'
> collect2: ld returned 1 exit status
> make: *** [btrfs] Error 1
>
> The gcc man page says: "[...] the placement of the -l option is significant." so lets include -lpthread together with the usual $(LIBS)
>
> Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Sergei also sent this patch a week ago. I agree with you. David, do you
want to investigate the -pthread option?
-Jan
prev parent reply other threads:[~2011-11-14 15:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-14 15:47 [PATCH] Btrfs-progs: Relocate -lpthread in makefile Arnd Hannemann
2011-11-14 15:57 ` Jan Schmidt [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=4EC13A54.6050606@jan-o-sch.net \
--to=list.btrfs@jan-o-sch.net \
--cc=arnd@arndnet.de \
--cc=chris.mason@oracle.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=slyfox@gentoo.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