Send inn-workers mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.isc.org/mailman/listinfo/inn-workers
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of inn-workers digest..."
Today's Topics:
1. Re: ovsqlite (Julien ?LIE)
2. Re: ovsqlite (Julien ?LIE)
3. Re: Hardening flags (Julien ?LIE)
----------------------------------------------------------------------
Message: 1
Date: Tue, 5 Jan 2021 13:37:57 +0100
From: Julien ?LIE <[email protected]>
To: "[email protected]" <[email protected]>
Subject: Re: ovsqlite
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Bo,
> That's a clean exit, so it should return 0.
Speaking of ovsqlite-server and its main() function, I'm facing a build
issue on BSD systems (with and without SQLite support):
FreeBSD 12.1
checking for a sufficiently recent SQLite... no
../libtool --mode=link cc -pie -fstack-protector-strong -Wl,-z,relro
-Wl,-z,now -o ovsqlite/ovsqlite-server
/home/iulius/autobuild/inn-gcc303/storage/libstorage.la
/home/iulius/autobuild/inn-gcc303/history/libinnhist.la
/home/iulius/autobuild/inn-gcc303/lib/libinn.la -lz
libtool: link: cc -pie -fstack-protector-strong -Wl,-z -Wl,relro -Wl,-z
-Wl,now -o ovsqlite/.libs/ovsqlite-server
/home/iulius/autobuild/inn-gcc303/history/.libs/libinnhist.so
/home/iulius/autobuild/inn-gcc303/storage/.libs/libstorage.so
/home/iulius/autobuild/inn-gcc303/lib/.libs/libinn.so -lz -Wl,-rpath
-Wl,/usr/local/news/lib
ld: error: undefined symbol: main
>>> referenced by crt1.c:76 (/usr/src/lib/csu/amd64/crt1.c:76)
>>> /usr/lib/Scrt1.o:(_start)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
NetBSD 9.0
checking for a sufficiently recent SQLite... yes
../libtool --mode=link gcc -pie -fstack-protector-strong -Wl,-z,relro
-Wl,-z,now -o ovsqlite/ovsqlite-server
/home/iulius/autobuild/inn-gcc300/storage/libstorage.la
/home/iulius/autobuild/inn-gcc300/history/libinnhist.la
/home/iulius/autobuild/inn-gcc300/lib/libinn.la -lz -lsqlite3
libtool: link: gcc -pie -fstack-protector-strong -Wl,-z -Wl,relro -Wl,-z
-Wl,now -o ovsqlite/.libs/ovsqlite-server
/home/iulius/autobuild/inn-gcc300/history/.libs/libinnhist.so
/home/iulius/autobuild/inn-gcc300/storage/.libs/libstorage.so
/home/iulius/autobuild/inn-gcc300/lib/.libs/libinn.so -lz -lsqlite3
-Wl,-rpath -Wl,/usr/local/news/lib
ld: /usr/lib/crt0.o: in function `___start':
(.text+0x2e9): undefined reference to `main'
*** Error code 1
Stop.
Do you happen to know how to fix that?
--
Julien ?LIE
??? vaincre sans p?ril, on triomphe sans gloire.?? (Corneille)
------------------------------
Message: 2
Date: Tue, 5 Jan 2021 13:38:52 +0100
From: Julien ?LIE <[email protected]>
To: [email protected]
Subject: Re: ovsqlite
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Bo,
>> Incidentally, do you happen to know the size of ovdb chunks? (and couldn't
>> they be increased?)
>
> It looks like it fetches one article at a time.
> You'd have to write new code to read ahead and buffer data.
OK, thanks, I'll mention that.
--
Julien ?LIE
??J'ai un copain, il est pilote d'essai? Enfin, il ne l'est pas encore?;
pour l'instant, il essaie d'?tre pilote?!?? (Raymond Devos)
------------------------------
Message: 3
Date: Tue, 5 Jan 2021 16:49:23 +0100
From: Julien ?LIE <[email protected]>
To: "[email protected]" <[email protected]>
Subject: Re: Hardening flags
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
Hi Russ,
>> INN_PROG_CC_FLAG([-fstack-protector-strong],
>> [CFLAGS="${CFLAGS} -fstack-protector-strong"], [])
>
> This looks fine for the stack protector flag. I'm not sure about PIE; it
> seems to be rather complicated.
It appears to be trickier than expected for -fstack-protector-strong.
Only adding it to CFLAGS seem to work well almost everywhere.
But Solaris also needs it in LDFLAGS. Otherwise the build fails when
linking executables:
Undefined first referenced
symbol in file
__stack_chk_fail art.o
__stack_chk_guard art.o
ld: fatal: symbol referencing errors
... and regarding AIX, though the compiler supports it, the linker does
not...
configure saw that, and therefore does not add -fstack-protector-strong
when linking:
libtool: link: gcc -pie -o .libs/innd art.o cc.o chan.o icd.o innd.o
keywords.o lc.o nc.o newsfeeds.o ng.o perl.o proc.o python.o rc.o site.o
status.o util.o wip.o /home/iulius/autobuild/inn-gcc119/lib/perl.o
-L/home/iulius/autobuild/inn-gcc119/storage/.libs
-L/home/iulius/autobuild/inn-gcc119/history/.libs
-L/home/iulius/autobuild/inn-gcc119/lib/.libs -linnhist -lstorage -linn
-ldb -lz
-Wl,-blibpath:/usr/local/news/lib:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0/../../..:/usr/lib:/lib
ld: 0711-317 ERROR: Undefined symbol: __stack_chk_guard
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
collect2: error: ld returned 8 exit status
make: 1254-004 The error code from the last command is 1.
Stop.
If I add it manually:
libtool: link: gcc -pie -o .libs/innd art.o cc.o chan.o icd.o innd.o
keywords.o lc.o nc.o newsfeeds.o ng.o perl.o proc.o python.o rc.o site.o
status.o util.o wip.o /home/iulius/autobuild/inn-gcc119/lib/perl.o
-fstack-protector-strong
-L/home/iulius/autobuild/inn-gcc119/storage/.libs
-L/home/iulius/autobuild/inn-gcc119/history/.libs
-L/home/iulius/autobuild/inn-gcc119/lib/.libs -linnhist -lstorage -linn
-ldb -lz
-Wl,-blibpath:/usr/local/news/lib:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0:/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/7.2.0/../../..:/usr/lib:/lib
collect2: fatal error: library libssp_nonshared not found
compilation terminated.
So there are cases where the compiler needs -fstack-protector-strong for
linking and also where the compiler accepts -fstack-protector-strong but
the build will nevertheless fail...
I've tried a patch for configure.ac. Hopefully we now get it right for
that flag.
--
Julien ?LIE
??J'ai un copain, il est pilote d'essai? Enfin, il ne l'est pas encore?;
pour l'instant, il essaie d'?tre pilote?!?? (Raymond Devos)
------------------------------
Subject: Digest Footer
_______________________________________________
inn-workers mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/inn-workers
------------------------------
End of inn-workers Digest, Vol 127, Issue 4
*******************************************