Re: How to compile APUE code on centos 6.X

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



On Thu, Jul 31, 2014 at 08:09:52AM +0800, Theodore Si wrote:
> I build it myself, not using rpm since it doesn't work. My OS is 32bit.

It works for me with libbsd and libbsd-devel installed:

$ cd /tmp
$ wget http://www.apuebook.com/src.3e.tar.gz
$ tar zxvf src.3e.tar.gz
$ cd apue.3e
$ make
[multiple lines building]
$ cd threads
$ make
gcc -ansi -I../include -Wall -DLINUX -D_GNU_SOURCE  barrier.c -o
barrier  -L../lib -lapue -pthread -lrt -lbsd
/tmp/ccmCvcBh.o: In function `thr_fn':
barrier.c:(.text+0x80): undefined reference to `heapsort'
collect2: ld returned 1 exit status
make: *** [barrier] Error 1
$ sudo yum -y -q install libbsd libbsd-devel
$ make
gcc -ansi -I../include -Wall -DLINUX -D_GNU_SOURCE  barrier.c -o
barrier  -L../lib -lapue -pthread -lrt -lbsd
$

I'll admit that my OS is 64-bit, but I don't see anything in the code
that would break with 32-bit.


-- 
Jonathan Billings <billings@xxxxxxxxxx>
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux