Bug 229390 - net-mgmt/collectd5 does not seem to build with mysql-support when using MariaDB 10.2
Summary: net-mgmt/collectd5 does not seem to build with mysql-support when using Maria...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-28 14:59 UTC by rainer
Modified: 2020-09-10 06:53 UTC (History)
3 users (show)

See Also:
ports: maintainer-feedback-


Attachments
collectd poudriere build log (199.71 KB, text/plain)
2018-06-28 14:59 UTC, rainer
no flags Details
collectd poudriere build log (200.48 KB, text/plain)
2019-02-01 08:41 UTC, rainer
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description rainer 2018-06-28 14:59:30 UTC
Created attachment 194709 [details]
collectd poudriere build log

see file for complete log.

libtool: link: /usr/bin/egrep -e "\<module_register\>" ".libs/modbus.exp" > ".libs/modbus.expT"
libtool: link: mv -f ".libs/modbus.expT" ".libs/modbus.exp"
libtool: link: echo "{ global:" > .libs/modbus.so-ver
libtool: link: 		 sed -e "s|$|;|" < .libs/modbus.exp >> .libs/modbus.so-ver
libtool: link: 	 echo "local: *; };" >> .libs/modbus.so-ver
libtool: link: cc -shared  -fPIC -DPIC  src/.libs/modbus_la-modbus.o   -L/usr/local/lib -lmodbus  -O2 -fstack-protector -fstack-protector   -Wl,-soname -Wl,modbus.so -Wl,-version-script -Wl,.libs/modbus.so-ver -o .libs/modbus.so
libtool: link: ( cd ".libs" && rm -f "modbus.la" && ln -s "../modbus.la" "modbus.la" )
/bin/sh ./libtool  --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I. -I./src  -I./src -I./src/daemon -DPREFIX='"/usr/local"' -DCONFIGFILE='"/usr/local/etc/collectd.conf"' -DLOCALSTATEDIR='"/var"' -DPKGLOCALSTATEDIR='"/var/db/collectd"' -DPLUGINDIR='"/usr/local/lib/collectd"' -DPKGDATADIR='"/usr/local/share/collectd"' -I/usr/local/include -I/usr/local/include -Wall  -I/usr/local/include/mysql -I/usr/local/include/mysql/mysql -I/usr/local/include -O2 -pipe  -Wno-deprecated-declarations -fstack-protector -fno-strict-aliasing -MT src/mysql_la-mysql.lo -MD -MP -MF src/.deps/mysql_la-mysql.Tpo -c -o src/mysql_la-mysql.lo `test -f 'src/mysql.c' || echo './'`src/mysql.c
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I./src -I./src -I./src/daemon -DPREFIX=\"/usr/local\" -DCONFIGFILE=\"/usr/local/etc/collectd.conf\" -DLOCALSTATEDIR=\"/var\" -DPKGLOCALSTATEDIR=\"/var/db/collectd\" -DPLUGINDIR=\"/usr/local/lib/collectd\" -DPKGDATADIR=\"/usr/local/share/collectd\" -I/usr/local/include -I/usr/local/include -Wall -I/usr/local/include/mysql -I/usr/local/include/mysql/mysql -I/usr/local/include -O2 -pipe -Wno-deprecated-declarations -fstack-protector -fno-strict-aliasing -MT src/mysql_la-mysql.lo -MD -MP -MF src/.deps/mysql_la-mysql.Tpo -c src/mysql.c  -fPIC -DPIC -o src/.libs/mysql_la-mysql.o
In file included from src/mysql.c:36:
/usr/local/include/mysql/mysql.h:139:5: error: attempt to use a poisoned identifier
    strcpy((a)->net.sqlstate, "00000");\
    ^
In file included from src/mysql.c:36:
In file included from /usr/local/include/mysql/mysql.h:423:
/usr/local/include/mysql/mariadb_stmt.h:47:3: error: attempt to use a poisoned identifier
  strcpy((a)->sqlstate, "00000");\
  ^
2 errors generated.
gmake[2]: *** [Makefile:6310: src/mysql_la-mysql.lo] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/net-mgmt/collectd5/work/collectd-5.8.0'
gmake[1]: *** [Makefile:4366: all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/net-mgmt/collectd5/work/collectd-5.8.0'
*** Error code 1

Stop.
make: stopped in /usr/ports/net-mgmt/collectd5
=>> Cleaning up wrkdir
===>  Cleaning for collectd5-5.8.0_1
build of net-mgmt/collectd5 | collectd5-5.8.0_1 ended at Wed Jun 27 12:59:56 CEST 2018
build time: 00:03:03
!!! build failure encountered !!!
Comment 1 Krzysztof 2018-06-28 17:52:51 UTC
OK,

It seems that was patched on github - see https://github.com/collectd/collectd/issues/2769

I suppose it will be available on new release - then it will be worked correctly.

For now using mariadb is not recommended :-)))
Comment 2 Krzysztof 2018-07-01 21:06:16 UTC
As I wrote previously we have to wait for new version of collectd.
Comment 3 rainer 2019-02-01 08:40:09 UTC
New version (5.8.1) does not fix it.
Comment 4 rainer 2019-02-01 08:41:35 UTC
Created attachment 201586 [details]
collectd poudriere build log
Comment 5 rainer 2019-02-01 08:58:40 UTC
Log is from 11.2.

Also doesn't build on 12.0, obviously.
Comment 6 Krzysztof 2019-02-04 07:03:36 UTC
I've read this issue on github once again. It seems, that clang is setting up some variables (one of them is __GNUC__). collectd was checking if it is build in debug mode and then poisoning "strcpy".

But it was modified a half a year ago:
https://github.com/collectd/collectd/pull/2804/commits/fa36b45bfafec663e49639d40f4671e018e7ee10

I will checkit in some days.
Comment 7 Krzysztof 2019-02-04 07:16:08 UTC
OK. I've found that this patch (https://github.com/collectd/collectd/pull/2804/commits) is not included in new relase of collectd.

So I think it will be better to write our (I mean FreeBSD) patch to stop poisoning strcpy function? 

Or maybe we have to just uncheck "LOGGING" option during building of collectd.
Comment 8 Alexey Dokuchaev freebsd_committer 2020-07-07 12:13:51 UTC
I've just successfully built logging-enabled collectd 5.11.0 against MariaDB 10.3 (notice that version 10.2 had expired and removed as of ports r540951) without issues.

I'd suggest all interested parties check this again and report whether the problem persists.  Otherwise we'd should probably close this bug as "overcome by events".
Comment 9 Krzysztof 2020-09-10 06:01:56 UTC
Yes, I think that's good idea to close this bug.
Comment 10 Alexey Dokuchaev freebsd_committer 2020-09-10 06:53:26 UTC
Closing per comment #8 and no feedback for over two months.