Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Sep 2018 13:28:04 +0200
From:      Jakob Breivik Grimstveit <jakob@grimstveit.no>
To:        se@freebsd.org
Cc:        FreeBSD Ports mailing list <freebsd-ports@freebsd.org>
Subject:   Re: Error building net/librsync2
Message-ID:  <CAFVH1KWiQEabh7qB6Z37aswUZduF2EirqoKGM%2B0XmAHt-O5jzw@mail.gmail.com>
In-Reply-To: <6797c7a2-6f73-ab54-6695-99f67716d4ca@freebsd.org>
References:  <CAFVH1KUTvXZ1YyV7Ep_TP99vcYjj%2B3ABHeUNM5q0SwFsVVahNg@mail.gmail.com> <6797c7a2-6f73-ab54-6695-99f67716d4ca@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Den tir. 18. sep. 2018 kl. 13:12 skrev Stefan Esser <se@freebsd.org>:

> This is the 2nd report of this issue, but I cannot reproduce it on my
> amd64-CURRENT system.
>
> This might be caused by stdio.h being included by header-pollution on
> some but not all FreeBSD versions.
>
> Try adding "#include <stdio.h>" at the top of tests/sumset_test.c:
>
> --- tests/sumset_test.c.orig    2018-02-27 11:08:36.000000000 +0100
> +++ tests/sumset_test.c 2018-09-18 13:10:48.295360000 +0200
> @@ -22,6 +22,7 @@
>  /* Force DEBUG on so that tests can use assert(). */
>  #undef NDEBUG
>  #include "config.h"
> +#include <stdio.h>
>  #include <string.h>
>  #include <assert.h>
>  #include "librsync.h"

Thanks a lot. It worked! :-)

$ sudo patch < patch0
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- tests/sumset_test.c.orig    2018-02-27 11:08:36.000000000 +0100
|+++ tests/sumset_test.c 2018-09-18 13:10:48.295360000
+0200--------------------------
Patching file tests/sumset_test.c using Plan A...
Hunk #1 succeeded at 22.
done

$ cd ../..&&sudo make
===>  Building for librsync2-2.0.2
[1/18] : && /usr/bin/cc -fPIC -O2 -pipe -march=native
-fstack-protector -fno-strict-aliasing -Wall -O2 -pipe -march=native
-fstack-protector -fno-strict-aliasing  -fstack-protector -shared
-Wl,-soname,librsync.so.2 -o librsync.so.2.0.2
CMakeFiles/rsync.dir/src/prototab.c.o
CMakeFiles/rsync.dir/src/base64.c.o CMakeFiles/rsync.dir/src/buf.c.o
CMakeFiles/rsync.dir/src/checksum.c.o
CMakeFiles/rsync.dir/src/command.c.o
CMakeFiles/rsync.dir/src/delta.c.o CMakeFiles/rsync.dir/src/emit.c.o
CMakeFiles/rsync.dir/src/fileutil.c.o
CMakeFiles/rsync.dir/src/hashtable.c.o
CMakeFiles/rsync.dir/src/hex.c.o CMakeFiles/rsync.dir/src/job.c.o
CMakeFiles/rsync.dir/src/mdfour.c.o CMakeFiles/rsync.dir/src/mksum.c.o
CMakeFiles/rsync.dir/src/msg.c.o CMakeFiles/rsync.dir/src/netint.c.o
CMakeFiles/rsync.dir/src/patch.c.o
CMakeFiles/rsync.dir/src/readsums.c.o
CMakeFiles/rsync.dir/src/rollsum.c.o
CMakeFiles/rsync.dir/src/scoop.c.o CMakeFiles/rsync.dir/src/stats.c.o
CMakeFiles/rsync.dir/src/stream.c.o
CMakeFiles/rsync.dir/src/sumset.c.o CMakeFiles/rsync.dir/src/trace.c.o
CMakeFiles/rsync.dir/src/tube.c.o CMakeFiles/rsync.dir/src/util.c.o
CMakeFiles/rsync.dir/src/version.c.o
CMakeFiles/rsync.dir/src/whole.c.o
CMakeFiles/rsync.dir/src/blake2/blake2b-ref.c.o   && :
[2/18] /usr/local/bin/cmake -E cmake_symlink_library librsync.so.2.0.2
 librsync.so.2 librsync.so && :
[3/18] /usr/bin/cc  -I/usr/local/include -Isrc/blake2 -Isrc -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -Wall -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -MD -MT
CMakeFiles/sumset_test.dir/src/rollsum.c.o -MF
CMakeFiles/sumset_test.dir/src/rollsum.c.o.d -o
CMakeFiles/sumset_test.dir/src/rollsum.c.o   -c src/rollsum.c
[4/18] /usr/bin/cc  -I/usr/local/include -Isrc/blake2 -Isrc -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -Wall -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -MD -MT
CMakeFiles/rollsum_test.dir/src/rollsum.c.o -MF
CMakeFiles/rollsum_test.dir/src/rollsum.c.o.d -o
CMakeFiles/rollsum_test.dir/src/rollsum.c.o   -c src/rollsum.c
[5/18] /usr/bin/cc  -I/usr/local/include -Isrc/blake2 -Isrc -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -Wall -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -MD -MT
CMakeFiles/sumset_test.dir/src/hashtable.c.o -MF
CMakeFiles/sumset_test.dir/src/hashtable.c.o.d -o
CMakeFiles/sumset_test.dir/src/hashtable.c.o   -c src/hashtable.c
[6/18] /usr/bin/cc  -I/usr/local/include -Isrc/blake2 -Isrc -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -Wall -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -MD -MT
CMakeFiles/rollsum_test.dir/tests/rollsum_test.c.o -MF
CMakeFiles/rollsum_test.dir/tests/rollsum_test.c.o.d -o
CMakeFiles/rollsum_test.dir/tests/rollsum_test.c.o   -c
tests/rollsum_test.c
[7/18] /usr/bin/cc  -I/usr/local/include -Isrc/blake2 -Isrc -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -Wall -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -MD -MT
CMakeFiles/isprefix_test.dir/tests/isprefix_test.c.o -MF
CMakeFiles/isprefix_test.dir/tests/isprefix_test.c.o.d -o
CMakeFiles/isprefix_test.dir/tests/isprefix_test.c.o   -c
tests/isprefix_test.c
[8/18] /usr/bin/cc  -I/usr/local/include -Isrc/blake2 -Isrc -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -Wall -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -MD -MT
CMakeFiles/hashtable_test.dir/src/hashtable.c.o -MF
CMakeFiles/hashtable_test.dir/src/hashtable.c.o.d -o
CMakeFiles/hashtable_test.dir/src/hashtable.c.o   -c src/hashtable.c
[9/18] : && /usr/bin/cc -O2 -pipe -march=native  -fstack-protector
-fno-strict-aliasing -Wall -O2 -pipe -march=native  -fstack-protector
-fno-strict-aliasing  -fstack-protector
CMakeFiles/rollsum_test.dir/tests/rollsum_test.c.o
CMakeFiles/rollsum_test.dir/src/rollsum.c.o  -o rollsum_test   && :
[10/18] /usr/bin/cc  -I/usr/local/include -Isrc/blake2 -Isrc -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -Wall -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -MD -MT
CMakeFiles/isprefix_test.dir/src/isprefix.c.o -MF
CMakeFiles/isprefix_test.dir/src/isprefix.c.o.d -o
CMakeFiles/isprefix_test.dir/src/isprefix.c.o   -c src/isprefix.c
[11/18] : && /usr/bin/cc -O2 -pipe -march=native  -fstack-protector
-fno-strict-aliasing -Wall -O2 -pipe -march=native  -fstack-protector
-fno-strict-aliasing  -fstack-protector
CMakeFiles/rdiff.dir/src/rdiff.c.o
CMakeFiles/rdiff.dir/src/isprefix.c.o  -o rdiff
-Wl,-rpath,/usr/ports/net/librsync2/work/librsync-2.0.2:/usr/local/lib:
librsync.so.2.0.2 /usr/local/lib/libpopt.so && :
[12/18] /usr/bin/cc  -I/usr/local/include -Isrc/blake2 -Isrc -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -Wall -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -MD -MT
CMakeFiles/sumset_test.dir/tests/sumset_test.c.o -MF
CMakeFiles/sumset_test.dir/tests/sumset_test.c.o.d -o
CMakeFiles/sumset_test.dir/tests/sumset_test.c.o   -c
tests/sumset_test.c
[13/18] : && /usr/bin/cc -O2 -pipe -march=native  -fstack-protector
-fno-strict-aliasing -Wall -O2 -pipe -march=native  -fstack-protector
-fno-strict-aliasing  -fstack-protector
CMakeFiles/isprefix_test.dir/tests/isprefix_test.c.o
CMakeFiles/isprefix_test.dir/src/isprefix.c.o  -o isprefix_test   && :
[14/18] /usr/bin/cc  -I/usr/local/include -Isrc/blake2 -Isrc -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -Wall -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -MD -MT
CMakeFiles/sumset_test.dir/src/mdfour.c.o -MF
CMakeFiles/sumset_test.dir/src/mdfour.c.o.d -o
CMakeFiles/sumset_test.dir/src/mdfour.c.o   -c src/mdfour.c
[15/18] /usr/bin/cc  -I/usr/local/include -Isrc/blake2 -Isrc -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -Wall -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -MD -MT
CMakeFiles/hashtable_test.dir/tests/hashtable_test.c.o -MF
CMakeFiles/hashtable_test.dir/tests/hashtable_test.c.o.d -o
CMakeFiles/hashtable_test.dir/tests/hashtable_test.c.o   -c
tests/hashtable_test.c
[16/18] : && /usr/bin/cc -O2 -pipe -march=native  -fstack-protector
-fno-strict-aliasing -Wall -O2 -pipe -march=native  -fstack-protector
-fno-strict-aliasing  -fstack-protector
CMakeFiles/hashtable_test.dir/tests/hashtable_test.c.o
CMakeFiles/hashtable_test.dir/src/hashtable.c.o  -o hashtable_test
&& :
[17/18] /usr/bin/cc  -I/usr/local/include -Isrc/blake2 -Isrc -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -Wall -O2 -pipe
-march=native  -fstack-protector -fno-strict-aliasing -MD -MT
CMakeFiles/sumset_test.dir/src/blake2/blake2b-ref.c.o -MF
CMakeFiles/sumset_test.dir/src/blake2/blake2b-ref.c.o.d -o
CMakeFiles/sumset_test.dir/src/blake2/blake2b-ref.c.o   -c
src/blake2/blake2b-ref.c
[18/18] : && /usr/bin/cc -O2 -pipe -march=native  -fstack-protector
-fno-strict-aliasing -Wall -O2 -pipe -march=native  -fstack-protector
-fno-strict-aliasing  -fstack-protector
CMakeFiles/sumset_test.dir/tests/sumset_test.c.o
CMakeFiles/sumset_test.dir/src/sumset.c.o
CMakeFiles/sumset_test.dir/src/util.c.o
CMakeFiles/sumset_test.dir/src/trace.c.o
CMakeFiles/sumset_test.dir/src/hex.c.o
CMakeFiles/sumset_test.dir/src/checksum.c.o
CMakeFiles/sumset_test.dir/src/rollsum.c.o
CMakeFiles/sumset_test.dir/src/mdfour.c.o
CMakeFiles/sumset_test.dir/src/hashtable.c.o
CMakeFiles/sumset_test.dir/src/blake2/blake2b-ref.c.o  -o sumset_test
 && :
===>  Staging for librsync2-2.0.2
===>   Generating temporary packing list
[0/1] cd /usr/ports/net/librsync2/work/librsync-2.0.2 &&
/usr/local/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
-- Install configuration: "Release"
-- Installing: /usr/ports/net/librsync2/work/stage/usr/local/lib/librsync.so.2.0.2
-- Installing: /usr/ports/net/librsync2/work/stage/usr/local/lib/librsync.so.2
-- Installing: /usr/ports/net/librsync2/work/stage/usr/local/lib/librsync.so
-- Installing: /usr/ports/net/librsync2/work/stage/usr/local/bin/rdiff
-- Set runtime path of
"/usr/ports/net/librsync2/work/stage/usr/local/bin/rdiff" to
"/usr/local/lib"
-- Installing: /usr/ports/net/librsync2/work/stage/usr/local/include/librsync.h
-- Installing: /usr/ports/net/librsync2/work/stage/usr/local/man/man3/librsync.3
-- Installing: /usr/ports/net/librsync2/work/stage/usr/local/man/man1/rdiff.1
/usr/bin/strip /usr/ports/net/librsync2/work/stage/usr/local/lib/librsync.so.2.0.2
install  -m 444
/usr/ports/net/librsync2/work/librsync-2.0.2/doc/librsync.3
/usr/ports/net/librsync2/work/stage/usr/local/man/man3
install  -m 444
/usr/ports/net/librsync2/work/librsync-2.0.2/doc/rdiff.1
/usr/ports/net/librsync2/work/stage/usr/local/man/man1
====> Compressing man pages (compress-man)

$ sudo make deinstall reinstall===>  Deinstalling for librsync2
===>   Deinstalling librsync2-2.0.0_1
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0
packages in the universe):

Installed packages to be REMOVED:
        librsync2-2.0.0_1

Number of packages to be removed: 1
[1/1] Deinstalling librsync2-2.0.0_1...
[1/1] Deleting files for librsync2-2.0.0_1: 100%
===>  Installing for librsync2-2.0.2
===>   Registering installation for librsync2-2.0.2
Installing librsync2-2.0.2...



-- 
Vyrdsamt,
    Jakob Breivik Grimstveit | +47 482 98 152
    http://grimstveit.no/jakob



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFVH1KWiQEabh7qB6Z37aswUZduF2EirqoKGM%2B0XmAHt-O5jzw>