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

Re: Potential spiped 1.4.0 release -- please test



Alas, my report comes too late to fix 1.4.0 for OS X 10.9.4, but I
have a few minor issues to report.

The first problem is with POSIX/posix-cflags.sh. Its lines that do
'echo "-D..."' prints trailing newlines, but if only one POSIX
violation is detected it turns out okay since that trailing newline
gets eaten (I'm guessing by the backticks). However, if both POSIX
violations are triggered, then a newline gets inserted into the middle
of CFLAGS_POSIX, which confuses make:

$ bsdmake
export CFLAGS="${CFLAGS:--O2}";  export LDADD_POSIX=`export CC="cc";
cd POSIX && command -p sh posix-l.sh`;      export
CFLAGS_POSIX=`export CC="cc"; cd POSIX && command -p sh
posix-cflags.sh`;        ( export CC="cc"; cd
libcperciva/cpusupport/Build && command -p sh cpusupport.sh ) >
cpusupport-config.h;       . ./cpusupport-config.h;
    for D in spiped spipe; do              ( cd ${D} && make all ) ||
exit 2;       done
WARNING: POSIX violation: make's CC doesn't understand -lrt
WARNING: POSIX violation: make's CC doesn't understand -lxnet
WARNING: POSIX violation: <sys/socket.h> not defining MSG_NOSIGNAL
WARNING: POSIX violation: <time.h> not defining CLOCK_REALTIME
Checking if compiler supports X86 CPUID feature... yes
Checking if compiler supports X86 AESNI feature... yes, via -maes
cc -O2 -DPOSIXFAIL_MSG_NOSIGNAL
clang: error: no input files
make: *** [main.o] Error 1
*** Error code 2
Stop in /private/tmp/spiped-1.4.0.

Since sh's echo doesn't support the -n switch, a solution is to use
printf instead, e.g.:

printf %s "-DPOSIXFAIL_MSG_NOSIGNAL "

This seems to work for me. (Note the trailing space before the closing quote.)

The second less serious problem is that the root Makefile assumes make
== bsdmake. This seems not to cause any problems currently, but I
suggest fixing it anyway, by replacing 'make' with '${MAKE}'.

Hope this helps.

-- Fred

On Sat, Aug 23, 2014 at 11:07 PM, Colin Percival <cperciva@tarsnap.com> wrote:
> On 08/23/14 20:08, Max Afonov wrote:
>> Builds fine on Android (a recent CyanogenMod 11 nightly build) using a
>> Debian testing userland in a chroot. Looks like cpusupport-config.h
>> comes out empty.
>
> Perfect, that's what should happen when compiling for systems which don't
> have x86 instructions.
>
> --
> Colin Percival
> Security Officer Emeritus, FreeBSD | The power to serve
> Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
>