Discussion:
[Gluster-users] Compiling 3.13.2 under FreeBSD 11.1?
Roman Serbski
2018-05-07 08:29:43 UTC
Permalink
Hello,

Has anyone managed to successfully compile the latest 3.13.2 under
FreeBSD 11.1? ./autogen.sh and ./configure seem to work but make
fails:

Making all in src
CC glfs.lo
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
fatal error: error in backend: A @@ version cannot be undefined
cc: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on
LLVM 4.0.0)
Target: x86_64-unknown-freebsd11.1

# uname -a
FreeBSD int-smtp-03 11.1-RELEASE-p8 FreeBSD 11.1-RELEASE-p8 #0
r330926: Wed Mar 14 13:45:45 CET 2018
***@int-build:/usr/obj/usr/src/sys/BSD112017110501VM amd64

# pkg info
argp-standalone-1.3_3 Standalone version of arguments parsing
functions from GLIBC
autoconf-2.69_1 Automatically configure source code on
many Un*x platforms
autoconf-wrapper-20131203 Wrapper script for GNU autoconf
automake-1.15.1 GNU Standards-compliant Makefile generator
automake-wrapper-20131203 Wrapper script for GNU automake
bison-3.0.4,1 Parser generator from FSF, (mostly)
compatible with Yacc
ca_root_nss-3.36.1 Root certificate bundle from the Mozilla Project
curl-7.59.0 Command line tool and library for
transferring data with URLs
cyrus-sasl-2.1.26_13 RFC 2222 SASL (Simple Authentication
and Security Layer)
gettext-runtime-0.19.8.1_1 GNU gettext runtime libraries and programs
glib-2.50.3_2,1 Some useful routines of C programming
(current stable version)
indexinfo-0.3.1 Utility to regenerate the GNU info page index
libedit-3.1.20170329_2,1 Command line editor library
libevent-2.1.8_1 API for executing callback functions on
events or timeouts
libffi-3.2.1_2 Foreign Function Interface
libiconv-1.14_11 Character set conversion library
liblz4-1.8.1.2,1 LZ4 compression library, lossless and very fast
libnghttp2-1.31.1 HTTP/2.0 C Library
libtool-2.4.6 Generic shared library support script
liburcu-0.10.0 Userspace read-copy-update (RCU) data
synchronization library
m4-1.4.18,1 GNU M4
mysql57-client-5.7.22_1 Multithreaded SQL database (client)
pcre-8.40_1 Perl Compatible Regular Expressions library
perl5-5.26.2 Practical Extraction and Report Language
pkg-1.10.5 Package manager
pkgconf-1.4.2,1 Utility to help to configure compiler
and linker flags
protobuf-3.5.2 Data interchange format library
python2-2_3 The "meta-port" for version 2 of the
Python interpreter
python27-2.7.14_1 Interpreted object-oriented programming language
readline-7.0.3_1 Library for editing command lines as
they are typed
sqlite3-3.23.1 SQL database engine in a C library

# clang -v
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on
LLVM 4.0.0)
Target: x86_64-unknown-freebsd11.1
Thread model: posix
InstalledDir: /usr/bin

./autogen.sh > https://pastebin.com/BJ16SmTM

./configure > https://pastebin.com/4SybcRTZ

make > https://pastebin.com/12YLjPid

glfs-8a2844.sh > https://pastebin.com/q3q0vWVS

glfs-8a2844.c > is too big. Please let me know whether you'd be
interested to see it as well.

Thank you in advance.
Kaleb S. KEITHLEY
2018-05-07 19:19:26 UTC
Permalink
Post by Roman Serbski
Hello,
Has anyone managed to successfully compile the latest 3.13.2 under
FreeBSD 11.1? ./autogen.sh and ./configure seem to work but make
See https://review.gluster.org/19974

3.13 reached EOL with 4.0. There will be a fix posted for 4.0 soon. In
the mean time I believe your specific problem with 3.13.2 should be
resolved with this:

diff --git a/api/src/glfs.c b/api/src/glfs.c
index 2a7ae2f39..8a9659766 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -1569,8 +1569,8 @@ out:
GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_sysrq, 3.10.0);

int
-glfs_upcall_register (struct glfs *fs, uint32_t event_list,
- glfs_upcall_cbk cbk, void *data)
+pub_glfs_upcall_register (struct glfs *fs, uint32_t event_list,
+ glfs_upcall_cbk cbk, void *data)
{
int ret = 0;

@@ -1618,9 +1618,11 @@ out:
invalid_fs:
return ret;
}
+
GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_register, 3.13.0);

-int glfs_upcall_unregister (struct glfs *fs, uint32_t event_list)
+int
+pub_glfs_upcall_unregister (struct glfs *fs, uint32_t event_list)
{
int ret = 0;
/* list of supported upcall events */
@@ -1663,4 +1665,5 @@ out:
invalid_fs:
return ret;
}
+
GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_upcall_unregister, 3.13.0);
Post by Roman Serbski
Making all in src
CC glfs.lo
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
cc: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on
LLVM 4.0.0)
Target: x86_64-unknown-freebsd11.1
# uname -a
FreeBSD int-smtp-03 11.1-RELEASE-p8 FreeBSD 11.1-RELEASE-p8 #0
r330926: Wed Mar 14 13:45:45 CET 2018
# pkg info
argp-standalone-1.3_3 Standalone version of arguments parsing
functions from GLIBC
autoconf-2.69_1 Automatically configure source code on
many Un*x platforms
autoconf-wrapper-20131203 Wrapper script for GNU autoconf
automake-1.15.1 GNU Standards-compliant Makefile generator
automake-wrapper-20131203 Wrapper script for GNU automake
bison-3.0.4,1 Parser generator from FSF, (mostly)
compatible with Yacc
ca_root_nss-3.36.1 Root certificate bundle from the Mozilla Project
curl-7.59.0 Command line tool and library for
transferring data with URLs
cyrus-sasl-2.1.26_13 RFC 2222 SASL (Simple Authentication
and Security Layer)
gettext-runtime-0.19.8.1_1 GNU gettext runtime libraries and programs
glib-2.50.3_2,1 Some useful routines of C programming
(current stable version)
indexinfo-0.3.1 Utility to regenerate the GNU info page index
libedit-3.1.20170329_2,1 Command line editor library
libevent-2.1.8_1 API for executing callback functions on
events or timeouts
libffi-3.2.1_2 Foreign Function Interface
libiconv-1.14_11 Character set conversion library
liblz4-1.8.1.2,1 LZ4 compression library, lossless and very fast
libnghttp2-1.31.1 HTTP/2.0 C Library
libtool-2.4.6 Generic shared library support script
liburcu-0.10.0 Userspace read-copy-update (RCU) data
synchronization library
m4-1.4.18,1 GNU M4
mysql57-client-5.7.22_1 Multithreaded SQL database (client)
pcre-8.40_1 Perl Compatible Regular Expressions library
perl5-5.26.2 Practical Extraction and Report Language
pkg-1.10.5 Package manager
pkgconf-1.4.2,1 Utility to help to configure compiler
and linker flags
protobuf-3.5.2 Data interchange format library
python2-2_3 The "meta-port" for version 2 of the
Python interpreter
python27-2.7.14_1 Interpreted object-oriented programming language
readline-7.0.3_1 Library for editing command lines as
they are typed
sqlite3-3.23.1 SQL database engine in a C library
# clang -v
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on
LLVM 4.0.0)
Target: x86_64-unknown-freebsd11.1
Thread model: posix
InstalledDir: /usr/bin
./autogen.sh > https://pastebin.com/BJ16SmTM
./configure > https://pastebin.com/4SybcRTZ
make > https://pastebin.com/12YLjPid
glfs-8a2844.sh > https://pastebin.com/q3q0vWVS
glfs-8a2844.c > is too big. Please let me know whether you'd be
interested to see it as well.
Thank you in advance.
_______________________________________________
Gluster-users mailing list
http://lists.gluster.org/mailman/listinfo/gluster-users
--
Kaleb
Roman Serbski
2018-05-09 13:02:07 UTC
Permalink
That's certainly true. The issue hasn't been fixed in any version of
gluster yet.
You can help moving it along by voting +1 on
https://review.gluster.org/19974
Will do -- thanks!
Based on that gdb bt you can try applying this patch too
https://review.gluster.org/19994
Tried it (both against 3.13.2 and 4.0.2), and now 'make' fails with:

make all-am
CC libglusterfs_la-dict.lo
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
CC libglusterfs_la-xlator.lo
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
CC libglusterfs_la-logging.lo
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
CC libglusterfs_la-hashfn.lo
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
CC libglusterfs_la-common-utils.lo
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
common-utils.c:3220:58: error: too few arguments provided to
function-like macro invocation
BIT_SET (ports, tmp_port1);
^
/usr/include/sys/bitset.h:50:9: note: macro 'BIT_SET' defined here
#define BIT_SET(_s, n, p) \
^
common-utils.c:3220:33: warning: expression result unused [-Wunused-value]
BIT_SET (ports, tmp_port1);
^~~~~~~
common-utils.c:3258:50: error: too few arguments provided to
function-like macro invocation
BIT_SET (ports, tmp_port1);
^
/usr/include/sys/bitset.h:50:9: note: macro 'BIT_SET' defined here
#define BIT_SET(_s, n, p) \
^
common-utils.c:3258:25: warning: expression result unused [-Wunused-value]
BIT_SET (ports, tmp_port1);
^~~~~~~
2 warnings and 2 errors generated.
*** Error code 1

Stop.
make[4]: stopped in /usr/home/SRC/glusterfs-3.13.2/libglusterfs/src
*** Error code 1

Stop.
make[3]: stopped in /usr/home/SRC/glusterfs-3.13.2/libglusterfs/src
*** Error code 1

Stop.
make[2]: stopped in /usr/home/SRC/glusterfs-3.13.2/libglusterfs
*** Error code 1

Stop.
make[1]: stopped in /usr/home/SRC/glusterfs-3.13.2
*** Error code 1

Stop.
make: stopped in /usr/home/SRC/glusterfs-3.13.2
Kaleb S. KEITHLEY
2018-05-09 13:09:38 UTC
Permalink
Post by Roman Serbski
That's certainly true. The issue hasn't been fixed in any version of
gluster yet.
You can help moving it along by voting +1 on
https://review.gluster.org/19974
Will do -- thanks!
Based on that gdb bt you can try applying this patch too
https://review.gluster.org/19994
get the latest patch. ;-)
Post by Roman Serbski
make all-am
CC libglusterfs_la-dict.lo
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
CC libglusterfs_la-xlator.lo
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
CC libglusterfs_la-logging.lo
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
CC libglusterfs_la-hashfn.lo
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
CC libglusterfs_la-common-utils.lo
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-rdynamic'
[-Wunused-command-line-argument]
common-utils.c:3220:58: error: too few arguments provided to
function-like macro invocation
BIT_SET (ports, tmp_port1);
^
/usr/include/sys/bitset.h:50:9: note: macro 'BIT_SET' defined here
#define BIT_SET(_s, n, p) \
^
common-utils.c:3220:33: warning: expression result unused [-Wunused-value]
BIT_SET (ports, tmp_port1);
^~~~~~~
common-utils.c:3258:50: error: too few arguments provided to
function-like macro invocation
BIT_SET (ports, tmp_port1);
^
/usr/include/sys/bitset.h:50:9: note: macro 'BIT_SET' defined here
#define BIT_SET(_s, n, p) \
^
common-utils.c:3258:25: warning: expression result unused [-Wunused-value]
BIT_SET (ports, tmp_port1);
^~~~~~~
2 warnings and 2 errors generated.
*** Error code 1
Stop.
make[4]: stopped in /usr/home/SRC/glusterfs-3.13.2/libglusterfs/src
*** Error code 1
Stop.
make[3]: stopped in /usr/home/SRC/glusterfs-3.13.2/libglusterfs/src
*** Error code 1
Stop.
make[2]: stopped in /usr/home/SRC/glusterfs-3.13.2/libglusterfs
*** Error code 1
Stop.
make[1]: stopped in /usr/home/SRC/glusterfs-3.13.2
*** Error code 1
Stop.
make: stopped in /usr/home/SRC/glusterfs-3.13.2
_______________________________________________
Gluster-users mailing list
http://lists.gluster.org/mailman/listinfo/gluster-users
--
Kaleb
Roman Serbski
2018-05-09 14:13:36 UTC
Permalink
Post by Kaleb S. KEITHLEY
Post by Roman Serbski
That's certainly true. The issue hasn't been fixed in any version of
gluster yet.
You can help moving it along by voting +1 on
https://review.gluster.org/19974
Will do -- thanks!
Based on that gdb bt you can try applying this patch too
https://review.gluster.org/19994
get the latest patch. ;-)
Success! Both in building and executing of gluster.

Well done Kaleb, and thank you very much! I'm going to test it
further, and hopefully the FreeBSD port could be now updated to the
latest version.

Regards,
Roman

Loading...