I'm packaging butt for Fedora. My build is sucessful on every architecture except s390x.
https://koji.fedoraproject.org/koji/taskinfo?taskID=34034866
It's not clear to me why this is failing, but a few things jump out at me as different between s390x and x86_64.
x86_64:
checking for X... libraries , headers
checking for GNU libc compatible malloc... yes
checking for GNU libc compatible realloc... yes
checking for gethostbyaddr... yes
checking for gethostbyname... yes
checking for memset... yes
checking for select... yes
checking for socket... yes
checking for strchr... yes
checking for strdup... yes
checking for strpbrk... yes
checking for strrchr... yes
checking for strstr... yes
full log - https://kojipkgs.fedoraproject.org//work/tasks/4887/34034887/build.log
s390x:
checking for X... no
checking for GNU libc compatible malloc... no
checking for GNU libc compatible realloc... no
checking for gethostbyaddr... no
checking for gethostbyname... no
checking for memset... no
checking for select... no
checking for socket... no
checking for strchr... no
checking for strdup... no
checking for strpbrk... no
checking for strrchr... no
checking for strstr... no
full log - https://kojipkgs.fedoraproject.org//work/tasks/4891/34034891/build.log
Here's the error:
+ /usr/bin/make -O -j2
/usr/bin/make all-recursive
Making all in src
make[2]: Entering directory '/builddir/build/BUILD/butt-0.1.17/src'
g++ -DHAVE_CONFIG_H -I. -I.. -IFLTK -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=zEC12 -mtune=z13 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -c -o cfg.o cfg.cpp
make[2]: Leaving directory '/builddir/build/BUILD/butt-0.1.17/src'
BUILDSTDERR: In file included from /usr/include/c++/9/stdlib.h:36,
BUILDSTDERR: from port_audio.h:20,
BUILDSTDERR: from cfg.h:19,
BUILDSTDERR: from cfg.cpp:22:
BUILDSTDERR: /usr/include/c++/9/cstdlib:151:11: error: '::malloc' has not been declared
BUILDSTDERR: 151 | using ::malloc;
BUILDSTDERR: | ^~~~~~
BUILDSTDERR: /usr/include/c++/9/cstdlib:164:11: error: '::realloc' has not been declared
BUILDSTDERR: 164 | using ::realloc;
BUILDSTDERR: | ^~~~~~~
BUILDSTDERR: In file included from port_audio.h:20,
BUILDSTDERR: from cfg.h:19,
BUILDSTDERR: from cfg.cpp:22:
BUILDSTDERR: /usr/include/c++/9/stdlib.h:65:12: error: 'std::malloc' has not been declared
BUILDSTDERR: 65 | using std::malloc;
BUILDSTDERR: | ^~~~~~
BUILDSTDERR: /usr/include/c++/9/stdlib.h:73:12: error: 'std::realloc' has not been declared
BUILDSTDERR: 73 | using std::realloc;
BUILDSTDERR: | ^~~~~~~
BUILDSTDERR: cfg.cpp: In function 'int cfg_set_values(char*)':
BUILDSTDERR: cfg.cpp:533:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
BUILDSTDERR: 533 | if(cfg.main.app_update_service == -1)
BUILDSTDERR: | ^~
BUILDSTDERR: cfg.cpp:536:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
BUILDSTDERR: 536 | cfg.main.connect_at_startup = cfg_get_int("main", "connect_at_startup");
BUILDSTDERR: | ^~~
BUILDSTDERR: make[2]: *** [Makefile:517: cfg.o] Error 1
BUILDSTDERR: make[2]: *** Waiting for unfinished jobs....
make[2]: Entering directory '/builddir/build/BUILD/butt-0.1.17/src'
g++ -DHAVE_CONFIG_H -I. -I.. -IFLTK -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=zEC12 -mtune=z13 -fasynchronous-unwind-tables -fstack-clash-protection -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -c -o butt.o butt.cpp
make[2]: Leaving directory '/builddir/build/BUILD/butt-0.1.17/src'
BUILDSTDERR: In file included from FLTK/flgui.h:8,
BUILDSTDERR: from butt.cpp:47:
BUILDSTDERR: butt.cpp: In function 'int main(int, char**)':
BUILDSTDERR: ../config.h:160:16: error: 'rpl_malloc' was not declared in this scope
BUILDSTDERR: 160 | #define malloc rpl_malloc
BUILDSTDERR: | ^~~~~~~~~~
BUILDSTDERR: butt.cpp:144:27: note: in expansion of macro 'malloc'
BUILDSTDERR: 144 | cfg_path = (char*)malloc((strlen(argv[2])+1) * sizeof(char));
BUILDSTDERR: | ^~~~~~
BUILDSTDERR: ../config.h:160:16: error: 'rpl_malloc' was not declared in this scope
BUILDSTDERR: 160 | #define malloc rpl_malloc
BUILDSTDERR: | ^~~~~~~~~~
BUILDSTDERR: butt.cpp:154:27: note: in expansion of macro 'malloc'
BUILDSTDERR: 154 | cfg_path = (char*)malloc((PATH_MAX+strlen(CONFIG_FILE)+1) * sizeof(char));
BUILDSTDERR: | ^~~~~~
BUILDSTDERR: make[2]: *** [Makefile:517: butt.o] Error 1
BUILDSTDERR: make[1]: *** [Makefile:383: all-recursive] Error 1
BUILDSTDERR: make: *** [Makefile:324: all] Error 2
Is butt compatbile with s390x architecture? Any suggestions for getting this to compile?
It was pointed out to me that this is caused by an error in the configure.ac file. It's not specific to s390x but for some reason only causes a failure on that architecture. Making the following change allows butt to compile on all the Fedora architectures.
https://bugzilla.redhat.com/show_bug.cgi?id=1697142#c2
Last edit: Carl George 2019-04-09
Wow, nice finding. Will update it soon! Thanks for sharing the solution.
This appears to have been fixed in 0.1.18, but I don't see a way to close this bug myself.