[LinuxPPS] pps userland tools fail to build

Thorsten Mühlfelder thenktor at gmx.de
Sat Nov 29 14:04:02 CET 2008


Hi

I just wanted to build 2.6.28 RC6 kernel + userland tools. Kernel patch and build was OK, but userland tools fail to build.
Here is my build script:
	pkgver=2.6.28.0rc6elan
	cd /usr/include
        if [ ! -e "linux.old" ]; then
                mv linux linux.old
                mv asm asm.old
                mv asm-generic asm-generic.old
        fi
        if [ ! -e "/lib/modules/$pkgver/" ]; then
                echo "/lib/modules/$pkgver/ not found. Install kernel package first ;)"
                return 1
        fi
        ln -sf /lib/modules/$pkgver/build/include/linux linux
        ln -sf /lib/modules/$pkgver/build/include/asm asm
        ln -sf /lib/modules/$pkgver/build/include/asm-generic asm-generic
        cp /lib/modules/$pkgver/build/Documentation/pps/timepps.h timepps.h
        # build the tools
        cd /usr/src/linux-$pkgver/Documentation/pps
        make -j2 || return 1

And this is the output:
root[pps-tools]# ./build-pps-tools.sh 
cc -O2 -march=i486 -mtune=i686 -Wall -O2 -D_GNU_SOURCE -I . -ggdb -D__N_PPS=18    ppstest.c   -o ppstest
cc -O2 -march=i486 -mtune=i686 -Wall -O2 -D_GNU_SOURCE -I . -ggdb -D__N_PPS=18    ppsldisc.c   -o ppsldisc
In file included from /usr/include/bits/errno.h:25,
                 from /usr/include/errno.h:36,
                 from ppsldisc.c:4:
/usr/include/linux/errno.h:4:23: error: asm/errno.h: No such file or directory
In file included from /usr/include/sys/ioctl.h:27,
                 from ppsldisc.c:5:
/usr/include/bits/ioctls.h:24:24: error: asm/ioctls.h: No such file or directory
ppsldisc.c: In function 'main':
ppsldisc.c:37: error: 'TIOCSETD' undeclared (first use in this function)
ppsldisc.c:37: error: (Each undeclared identifier is reported only once
ppsldisc.c:37: error: for each function it appears in.)
make: *** [ppsldisc] Error 1
make: *** Waiting for unfinished jobs....
In file included from /usr/include/bits/errno.h:25,
                 from /usr/include/errno.h:36,
                 from ppstest.c:4:
/usr/include/linux/errno.h:4:23: error: asm/errno.h: No such file or directory
In file included from ./timepps.h:24,
                 from ppstest.c:10:
/usr/include/sys/syscall.h:25:24: error: asm/unistd.h: No such file or directory
In file included from /usr/include/linux/types.h:11,
                 from /usr/include/linux/pps.h:38,
                 from ./timepps.h:27,
                 from ppstest.c:10:
/usr/include/linux/posix_types.h:47:29: error: asm/posix_types.h: No such file or directory
In file included from /usr/include/linux/pps.h:38,
                 from ./timepps.h:27,
                 from ppstest.c:10:
/usr/include/linux/types.h:12:23: error: asm/types.h: No such file or directory
In file included from /usr/include/linux/pps.h:38,
                 from ./timepps.h:27,
                 from ppstest.c:10:
/usr/include/linux/types.h:180: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__le16'
/usr/include/linux/types.h:181: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__be16'
/usr/include/linux/types.h:182: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__le32'
/usr/include/linux/types.h:183: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__be32'
/usr/include/linux/types.h:185: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__le64'
/usr/include/linux/types.h:186: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__be64'
/usr/include/linux/types.h:188: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__sum16'
/usr/include/linux/types.h:189: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__wsum'
In file included from /usr/include/sys/ioctl.h:27,
                 from /usr/include/linux/pps.h:40,
                 from ./timepps.h:27,
                 from ppstest.c:10:
/usr/include/bits/ioctls.h:24:24: error: asm/ioctls.h: No such file or directory
In file included from ./timepps.h:27,
                 from ppstest.c:10:
/usr/include/linux/pps.h:61: error: expected specifier-qualifier-list before '__s64'
/usr/include/linux/pps.h:68: error: expected specifier-qualifier-list before '__u32'
In file included from /usr/include/linux/pps.h:124,
                 from ./timepps.h:27,
                 from ppstest.c:10:
/usr/include/linux/ioctl.h:4:23: error: asm/ioctl.h: No such file or directory
In file included from ppstest.c:10:
./timepps.h: In function 'time_pps_create':
./timepps.h:89: error: 'EINVAL' undeclared (first use in this function)
./timepps.h:89: error: (Each undeclared identifier is reported only once
./timepps.h:89: error: for each function it appears in.)
./timepps.h:95: warning: implicit declaration of function '_IO'
./timepps.h:97: error: 'EOPNOTSUPP' undeclared (first use in this function)
./timepps.h: In function 'time_pps_getparams':
./timepps.h:120: warning: implicit declaration of function '_IOR'
./timepps.h:120: error: expected expression before 'struct'
./timepps.h:124: error: 'struct pps_ktime' has no member named 'sec'
./timepps.h:125: error: 'struct pps_ktime' has no member named 'nsec'
./timepps.h:126: error: 'struct pps_ktime' has no member named 'sec'
./timepps.h:127: error: 'struct pps_ktime' has no member named 'nsec'
./timepps.h: In function 'time_pps_setparams':
./timepps.h:139: error: 'struct pps_ktime' has no member named 'sec'
./timepps.h:140: error: 'struct pps_ktime' has no member named 'nsec'
./timepps.h:141: error: 'struct pps_ktime' has no member named 'sec'
./timepps.h:142: error: 'struct pps_ktime' has no member named 'nsec'
./timepps.h:144: warning: implicit declaration of function '_IOW'
./timepps.h:144: error: expected expression before 'struct'
./timepps.h: In function 'time_pps_getcap':
./timepps.h:150: error: expected expression before 'int'
./timepps.h: In function 'time_pps_fetch':
./timepps.h:162: error: 'EINVAL' undeclared (first use in this function)
./timepps.h:167: error: 'struct pps_ktime' has no member named 'sec'
./timepps.h:168: error: 'struct pps_ktime' has no member named 'nsec'
./timepps.h:169: error: 'struct pps_ktime' has no member named 'flags'
./timepps.h:171: error: 'struct pps_ktime' has no member named 'flags'
./timepps.h:173: warning: implicit declaration of function '_IOWR'
./timepps.h:173: error: expected expression before 'struct'
./timepps.h:175: error: 'struct pps_kinfo' has no member named 'assert_sequence'
./timepps.h:176: error: 'struct pps_kinfo' has no member named 'clear_sequence'
./timepps.h:177: error: 'struct pps_kinfo' has no member named 'assert_tu'
./timepps.h:178: error: 'struct pps_kinfo' has no member named 'assert_tu'
./timepps.h:179: error: 'struct pps_kinfo' has no member named 'clear_tu'
./timepps.h:180: error: 'struct pps_kinfo' has no member named 'clear_tu'
./timepps.h:181: error: 'struct pps_kinfo' has no member named 'current_mode'
./timepps.h: In function 'time_pps_kcbind':
./timepps.h:191: error: 'EOPNOTSUPP' undeclared (first use in this function)
ppstest.c: In function 'fetch_source':
ppstest.c:89: error: 'EINTR' undeclared (first use in this function)
ppstest.c: In function 'main':
ppstest.c:142: error: 'ETIMEDOUT' undeclared (first use in this function)
make: *** [ppstest] Error 1
build() failed.
root[pps-tools]# 



More information about the LinuxPPS mailing list