[ZBX-11764] Automake cleanups and small files Created: 2017 Feb 01 Updated: 2024 Apr 10 Resolved: 2019 Oct 16 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Installation (I) |
Affects Version/s: | 3.4.0alpha1 |
Fix Version/s: | 5.0.0alpha1, 5.0 (plan) |
Type: | Problem report | Priority: | Trivial |
Reporter: | Tomasz Kłoczko | Assignee: | Andrejs Kozlovs |
Resolution: | Fixed | Votes: | 0 |
Labels: | compilation, installation, patch | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() ![]() ![]() ![]() |
Team: | |
Sprint: | Sprint 57 (Oct 2019) |
Story Points: | 2 |
Description |
Attached patch contains some automake cleanups against trunk.
|
Comments |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 01 ] |
Could you provide more details on what you want to override with 1.? Does anyone really care about 2.? When is 3. a problem? |
Comment by Tomasz Kłoczko [ 2017 Feb 02 ] |
ad 2) it makes easy to add new file by one line change. Other thing is with keeping the same format everywhere. Generally importance is the same as with keeping the same style of C code indentation. As our brain is perfectly suited to catch any broken patterns keeping the same style everywhere allows easier catch points where (in this case automake) code is wrong. -libzbxdbcache_a_CFLAGS = -I@top_srcdir@/src/zabbix_server/ -I@top_srcdir@/src/libs/zbxalgo +libzbxdbcache_a_CFLAGS = \ + -I$(top_srcdir)/src/zabbix_server \ + -I$(top_srcdir)/src/libs/zbxalgo Without this is not possible to specify top_srcdir after running configure because it will be hardcoded at the end of configure execution, or: - -DSYSCONFDIR="\"@sysconfdir@\"" \ - -DLIBDIR="\"@libdir@\"" + -DSYSCONFDIR="\"$(sysconfdir)\"" \ + -DLIBDIR="\"$(libdir)\"" This will break for example overwriting sysconfdir on "make test sysconfdir=/my/cfg" where temporary new object file will be created, linked and used on tests. Generally using @FOO@ macroing in Makefile.am is kind bad habit. Usually it does not harm but when project grows/extends and for example sophisticated test (before install) will be added such things makes whole automake broken or it may be source of some confusion. tar xzf zabbix-<version>.tar.gz mkdir tmp_builddir cd tmp_builddir ../zabbix-<version>/configure <params> make Above will keep zabbix-<version>/ clean and all temporary files, Makefile, object files will go to tmp_builddir/. |
Comment by Tomasz Kłoczko [ 2017 Feb 10 ] |
Sorry .. may I ask for update? |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Feb 10 ] |
I am not in charge of making decisions which features are implemented, which bugs get fixed or which patches to review and test. Zabbix developers are few and they are overloaded. Sometimes I spend my free time to have a glance at user requests, problems, patches, etc. But at these moments I am usually an ordinary community member like you. Sorry. |
Comment by Tomasz Kłoczko [ 2017 May 02 ] |
Seems it is a problem with accepting my fixes. |
Comment by Tomasz Kłoczko [ 2017 May 12 ] |
Uploaded s/top_srcdir/top_builddir/ trunk patch. |
Comment by Tomasz Kłoczko [ 2017 May 19 ] |
Updated patch against trunk branch. |
Comment by Alexei Vladishev [ 2017 May 21 ] |
I am trying to repeat it with the latest trunk and it fails with and without top_srcdir patch: tar xzf zabbix-3.4.0alpha1.tar.gz mkdir tmp_builddir cd tmp_builddir ../zabbix-3.4.0alpha1/configure --enable-server --with-mysql make Error running make: make[1]: Entering directory '/tmp/tmp_builddir/src' Making all in libs make[2]: Entering directory '/tmp/tmp_builddir/src/libs' Making all in zbxcrypto make[3]: Entering directory '/tmp/tmp_builddir/src/libs/zbxcrypto' gcc -DHAVE_CONFIG_H -I. -I../../../../zabbix-3.4.0alpha1/src/libs/zbxcrypto -I../../../include -g -O2 -MT libzbxcrypto_a-md5.o -MD -MP -MF .deps/libzbxcrypto_a-md5.Tpo -c -o libzbxcrypto_a-md5.o `test -f 'md5.c' || echo '../../../../zabbix-3.4.0alpha1/src/libs/zbxcrypto/'`md5.c ../../../../zabbix-3.4.0alpha1/src/libs/zbxcrypto/md5.c:54:20: fatal error: common.h: No such file or directory compilation terminated. I suspect it's something to do with include path that possibly also should be adjusted somewhere. |
Comment by Tomasz Kłoczko [ 2017 Sep 05 ] |
Just found what exactly was missing in cinfigure.ac to make this patch working. |
Comment by Tomasz Kłoczko [ 2019 Oct 04 ] |
FYI: In next few hours will try to upload updated version of that patch. |
Comment by Tomasz Kłoczko [ 2019 Oct 07 ] |
Just uploaded latest version of that patch for 4.2.7. |
Comment by Andrejs Kozlovs [ 2019 Oct 15 ] |
Fixed in:
|