Re: [PATCH] Btrfs-progs: Relocate -lpthread in makefile

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

 



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@xxxxxxxxxx>
Signed-off-by: Jan Schmidt <list.btrfs@xxxxxxxxxxxxx>

Sergei also sent this patch a week ago. I agree with you. David, do you
want to investigate the -pthread option?

-Jan
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux