Bug 245428 - net-im/ejabberd: Build fails with "/usr/bin/ld: unrecognized option '-plugin'"
Summary: net-im/ejabberd: Build fails with "/usr/bin/ld: unrecognized option '-plugin'"
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Ashish SHUKLA
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-07 18:11 UTC by Bernhard
Modified: 2020-04-13 07:39 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (ashish)


Attachments
Probable fix (1.20 KB, patch)
2020-04-08 12:29 UTC, Ashish SHUKLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard 2020-04-07 18:11:40 UTC
On a amd64 machine with 11.3-RELEASE-p6, the build of net-im/ejabberd 20.03 fails with the following output:

root@jabber-1:~ # portmaster -d net-im/ejabberd

===>>> Port directory: /basejail/usr/ports/net-im/ejabberd

===>>> Gathering distinfo list for installed ports

===>>> Gathering dependency list for net-im/ejabberd from ports
===>>> Initial dependency check complete for net-im/ejabberd


===>>> Starting build for net-im/ejabberd <<<===

===>>> All dependencies are up to date

===>  Cleaning for ejabberd-20.03
===>  License GPLv2 accepted by the user
===>   ejabberd-20.03 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by ejabberd-20.03 for building
=> SHA256 Checksum OK for erlang-lager-lager-3.6.10_GH0.tar.gz.
=> SHA256 Checksum OK for processone-p1_utils-1.0.18_GH0.tar.gz.
=> SHA256 Checksum OK for processone-cache_tab-1.0.22_GH0.tar.gz.
=> SHA256 Checksum OK for processone-fast_tls-1.1.4_GH0.tar.gz.
=> SHA256 Checksum OK for processone-stringprep-1.0.19_GH0.tar.gz.
=> SHA256 Checksum OK for processone-fast_xml-1.1.39_GH0.tar.gz.
=> SHA256 Checksum OK for processone-xmpp-1.4.5_GH0.tar.gz.
=> SHA256 Checksum OK for processone-p1_oauth2-0.6.6_GH0.tar.gz.
=> SHA256 Checksum OK for potatosalad-erlang-jose-1.9.0_GH0.tar.gz.
=> SHA256 Checksum OK for processone-eimp-1.0.14_GH0.tar.gz.
=> SHA256 Checksum OK for DeadZen-goldrush-0.1.9_GH0.tar.gz.
=> SHA256 Checksum OK for dvv-base64url-v1.0_GH0.tar.gz.
=> SHA256 Checksum OK for processone-ezlib-1.0.7_GH0.tar.gz.
=> SHA256 Checksum OK for processone-pkix-1.0.5_GH0.tar.gz.
=> SHA256 Checksum OK for processone-mqtree-1.0.7_GH0.tar.gz.
=> SHA256 Checksum OK for processone-yconf-1.0.4_GH0.tar.gz.
=> SHA256 Checksum OK for benoitc-erlang-idna-6.0.0_GH0.tar.gz.
=> SHA256 Checksum OK for benoitc-unicode_util_compat-0.4.1_GH0.tar.gz.
=> SHA256 Checksum OK for processone-p1_mysql-1.0.14_GH0.tar.gz.
=> SHA256 Checksum OK for processone-stun-1.0.31_GH0.tar.gz.
=> SHA256 Checksum OK for rvirding-luerl-v0.3_GH0.tar.gz.
===>  Patching for ejabberd-20.03
===>  Applying FreeBSD patches for ejabberd-20.03
===>   ejabberd-20.03 depends on executable: erlc - found
===>   ejabberd-20.03 depends on executable: gmake - found
===>   ejabberd-20.03 depends on package: pkgconf>=1.3.0_1 - found
===>   ejabberd-20.03 depends on file: /usr/local/lib/libcrypto.so.11 - found
===>   ejabberd-20.03 depends on package: autoconf>=2.69 - found
===>   ejabberd-20.03 depends on package: automake>=1.16.1 - found
===>   ejabberd-20.03 depends on shared library: libexpat.so - found (/usr/local/lib/libexpat.so)
===>   ejabberd-20.03 depends on shared library: libyaml.so - found (/usr/local/lib/libyaml.so)
===>   ejabberd-20.03 depends on shared library: libgd.so - found (/usr/local/lib/libgd.so)
===>   ejabberd-20.03 depends on shared library: libpng.so - found (/usr/local/lib/libpng.so)
===>   ejabberd-20.03 depends on shared library: libwebp.so - found (/usr/local/lib/libwebp.so)
===>   ejabberd-20.03 depends on shared library: libjpeg.so - found (/usr/local/lib/libjpeg.so)
===>  Configuring for ejabberd-20.03
cd /var/ports/basejail/usr/ports/net-im/ejabberd/work/ejabberd-20.03 && /bin/sh autogen.sh
configure: loading site script /basejail/usr/ports/Templates/config.site
checking whether gmake sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for erl... /usr/local/bin/erl
checking for erlc... /usr/local/bin/erlc
checking for epmd... /usr/local/bin/epmd
checking for erl... /usr/local/bin/erl
checking for erlc... /usr/local/bin/erlc
checking Erlang/OTP version... ok
checking for Erlang/OTP root directory... /usr/local/lib/erlang
checking for escript... /usr/local/lib/erlang/bin/escript
checking for make... gmake
configure: creating ./config.status
config.status: creating Makefile
config.status: creating vars.config
config.status: creating src/ejabberd.app.src
===>  Building for ejabberd-20.03
gmake[2]: Entering directory '/var/ports/basejail/usr/ports/net-im/ejabberd/work/ejabberd-20.03'
rm -rf deps/.got
rm -rf deps/.built
mkdir -p deps
/usr/local/lib/erlang/bin/escript rebar get-deps && :> deps/.got
==> goldrush (get-deps)
==> lager (get-deps)
==> p1_utils (get-deps)
==> cache_tab (get-deps)
==> fast_tls (get-deps)
==> stringprep (get-deps)
==> fast_xml (get-deps)
==> unicode_util_compat (get-deps)
==> idna (get-deps)
==> ezlib (get-deps)
==> xmpp (get-deps)
==> fast_yaml (get-deps)
==> yconf (get-deps)
==> jiffy (get-deps)
WARN:  Missing plugins: [rebar3_hex]
==> p1_oauth2 (get-deps)
WARN:  /var/ports/basejail/usr/ports/net-im/ejabberd/work/ejabberd-20.03/deps/base64url/src/base64url.app.src has version "1.0"; requested regex was 0.0.1
==> jose (get-deps)
==> eimp (get-deps)
==> mqtree (get-deps)
==> base64url (get-deps)
==> p1_acme (get-deps)
==> stun (get-deps)
==> p1_mysql (get-deps)
==> rel (get-deps)
==> ejabberd-20.03 (get-deps)
/usr/local/lib/erlang/bin/escript rebar configure-deps
==> lager (configure-deps)
==> p1_utils (configure-deps)
==> cache_tab (configure-deps)
==> fast_tls (configure-deps)
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... cpp
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ANSI C header files... (cached) yes
checking for erl... /usr/local/lib/erlang/erts-10.3.5.9/bin/erl
checking for erlc... /usr/local/lib/erlang/erts-10.3.5.9/bin/erlc
checking for SHA1_Init in -lcrypto... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking openssl/err.h usability... yes
checking openssl/err.h presence... yes
checking for openssl/err.h... yes
checking openssl/sha.h usability... yes
checking openssl/sha.h presence... yes
checking for openssl/sha.h... yes
checking openssl/opensslv.h usability... yes
checking openssl/opensslv.h presence... yes
checking for openssl/opensslv.h... yes
configure: creating ./config.status
config.status: creating vars.config
==> stringprep (configure-deps)
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... cpp
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ANSI C header files... (cached) yes
checking for erl... /usr/local/lib/erlang/erts-10.3.5.9/bin/erl
checking for erlc... /usr/local/lib/erlang/erts-10.3.5.9/bin/erlc
configure: creating ./config.status
config.status: creating vars.config
==> fast_xml (configure-deps)
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... cpp
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ANSI C header files... (cached) yes
checking for erl... /usr/local/lib/erlang/erts-10.3.5.9/bin/erl
checking for erlc... /usr/local/lib/erlang/erts-10.3.5.9/bin/erlc
checking expat.h usability... yes
checking expat.h presence... yes
checking for expat.h... yes
checking for library containing XML_ParserCreate... -lexpat
configure: creating ./config.status
config.status: creating vars.config
==> idna (configure-deps)
==> xmpp (configure-deps)
==> fast_yaml (configure-deps)
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... cpp
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for erl... /usr/local/lib/erlang/erts-10.3.5.9/bin/erl
checking for erlc... /usr/local/lib/erlang/erts-10.3.5.9/bin/erlc
checking yaml.h usability... yes
checking yaml.h presence... yes
checking for yaml.h... yes
checking for library containing yaml_parser_initialize... -lyaml
configure: creating ./config.status
config.status: creating vars.config
==> yconf (configure-deps)
==> jiffy (configure-deps)
WARN:  Missing plugins: [rebar3_hex]
==> p1_oauth2 (configure-deps)
==> pkix (configure-deps)
WARN:  /var/ports/basejail/usr/ports/net-im/ejabberd/work/ejabberd-20.03/deps/base64url/src/base64url.app.src has version "1.0"; requested regex was 0.0.1
==> jose (configure-deps)
==> eimp (configure-deps)
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... cpp
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for erl... /usr/local/lib/erlang/erts-10.3.5.9/bin/erl
checking for erlc... /usr/local/lib/erlang/erts-10.3.5.9/bin/erlc
checking gd.h usability... yes
checking gd.h presence... yes
checking for gd.h... yes
checking for library containing gdImageScale... -lgd
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for library containing gdImageCreateFromJpegPtr, gdImageJpegPtr... none required
checking for library containing jpeg_read_header... -ljpeg
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for library containing gdImageCreateFromPngPtr, gdImagePngPtr... none required
checking for library containing png_sig_cmp... -lpng
checking webp/decode.h usability... yes
checking webp/decode.h presence... yes
checking for webp/decode.h... yes
checking for library containing gdImageCreateFromWebpPtr, gdImageWebpPtr... none required
checking for library containing WebPGetInfo... -lwebp
configure: creating ./config.status
config.status: creating vars.config
==> mqtree (configure-deps)
==> p1_acme (configure-deps)
==> stun (configure-deps)
==> p1_mysql (configure-deps)
==> luerl (configure-deps)
==> rel (configure-deps)
==> ejabberd-20.03 (configure-deps)
/usr/local/lib/erlang/bin/escript rebar compile && :> deps/.built
==> goldrush (compile)
Compiled src/gr_param_sup.erl
Compiled src/glc_run.erl
Compiled src/gr_counter.erl
Compiled src/gr_sup.erl
Compiled src/glc.erl
Compiled src/glc_lib.erl
Compiled src/gr_context.erl
Compiled src/gr_manager.erl
Compiled src/gr_counter_sup.erl
Compiled src/gr_manager_sup.erl
Compiled src/gr_param.erl
Compiled src/glc_ops.erl
Compiled src/gr_app.erl
Compiled src/gre.erl
Compiled src/glc_code.erl
==> lager (compile)
Compiled src/lager_util.erl
Compiled src/lager_rotator_behaviour.erl
Compiled src/lager_transform.erl
Compiled src/lager_msg.erl
Compiled src/lager_manager_killer.erl
Compiled src/lager_backend_throttle.erl
Compiled src/lager_rotator_default.erl
Compiled src/lager_console_backend.erl
Compiled src/lager_app.erl
Compiled src/lager.erl
Compiled src/lager_trunc_io.erl
Compiled src/lager_handler_watcher_sup.erl
Compiled src/lager_default_formatter.erl
Compiled src/lager_handler_watcher.erl
Compiled src/error_logger_lager_h.erl
Compiled src/lager_file_backend.erl
Compiled src/lager_crash_log.erl
Compiled src/lager_common_test_backend.erl
Compiled src/lager_sup.erl
Compiled src/lager_config.erl
Compiled src/lager_format.erl
Compiled src/lager_stdlib.erl
==> p1_utils (compile)
Compiled src/p1_server.erl
Compiled src/p1_time_compat.erl
Compiled src/p1_http.erl
Compiled src/p1_options.erl
Compiled src/p1_queue.erl
Compiled src/p1_file_queue.erl
Compiled src/p1_utils.erl
Compiled src/p1_fsm.erl
Compiled src/p1_utils_sup.erl
Compiled src/p1_nif_utils.erl
Compiled src/treap.erl
Compiled src/p1_rand.erl
Compiled src/p1_shaper.erl
Compiled src/p1_prof.erl
Compiled src/p1_edoc_layout.erl
==> cache_tab (compile)
Compiled src/ets_cache_options.erl
Compiled src/cache_tab_app.erl
Compiled src/cache_tab_sup.erl
Compiled src/cache_tab.erl
Compiled src/ets_cache.erl
Compiling c_src/ets_cache.c
==> fast_tls (compile)
Compiled src/fast_tls_app.erl
Compiled src/fast_tls_sup.erl
Compiled src/p1_sha.erl
Compiled src/fast_tls.erl
Compiling c_src/fast_tls.c
Compiling c_src/ioqueue.c
Compiling c_src/p1_sha.c
==> stringprep (compile)
Compiled src/stringprep_app.erl
Compiled src/stringprep_sup.erl
Compiled src/stringprep.erl
Compiling c_src/stringprep.cpp
==> fast_xml (compile)
Compiled src/fxml_gen_pt.erl
Compiled src/fxml_stream.erl
Compiled src/fxml.erl
Compiled src/fxmlrpc_codec_external.erl
Compiled src/fxmlrpc.erl
Compiled src/fast_xml.erl
Compiled src/fxmlrpc_codec.erl
Compiled src/fxml_gen.erl
Compiling c_src/fxml.c
Compiling c_src/fxml_stream.c
==> unicode_util_compat (compile)
Compiled src/unicode_util_compat.erl
==> idna (compile)
Compiled src/idna_ucs.erl
Compiled src/idna_table.erl
Compiled src/idna_bidi.erl
Compiled src/punycode.erl
Compiled src/idna_context.erl
Compiled src/idna.erl
Compiled src/idna_mapping.erl
Compiled src/idna_data.erl
==> ezlib (compile)
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether make sets $(MAKE)... yes
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... cpp
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for ANSI C header files... (cached) yes
checking for erl... /usr/local/lib/erlang/erts-10.3.5.9/bin/erl
checking for erlc... /usr/local/lib/erlang/erts-10.3.5.9/bin/erlc
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
configure: creating ./config.status
config.status: creating vars.config
Compiled src/ezlib_sup.erl
Compiled src/ezlib_app.erl
Compiled src/ezlib.erl
Compiling c_src/ezlib_drv.c
==> xmpp (compile)
Compiled asn1/XmppAddr.asn1
Compiled src/xmpp_socket.erl
Compiled src/xmpp_sasl.erl
Compiled src/xep0280.erl
Compiled src/xep0065.erl
Compiled src/xmpp_sasl_oauth.erl
Compiled src/xep0199.erl
Compiled src/flex_offline.erl
Compiled src/xep0300.erl
Compiled src/xep0022.erl
Compiled src/muc_request.erl
Compiled src/pubsub_get_pending.erl
Compiled src/xmpp_sasl_anonymous.erl
Compiled src/xep0264.erl
Compiled src/xep0059.erl
Compiled src/xep0356.erl
Compiled src/xmpp_tr.erl
Compiled src/xep0050.erl
Compiled src/xep0048.erl
Compiled src/xmpp_util.erl
Compiled src/xep0033.erl
Compiled src/muc_roominfo.erl
Compiled src/xep0249.erl
Compiled src/xmpp_stream_out.erl
Compiled src/xmpp_sasl_digest.erl
Compiled src/push_summary.erl
Compiled src/xmpp.erl
Compiled src/xep0172.erl
Compiled src/XmppAddr.erl
Compiled src/xep0363.erl
Compiled src/xep0023.erl
Compiled src/xep0334.erl
Compiled src/xdata_codec.erl
Compiled src/p1_mucsub.erl
Compiled src/xep0016.erl
Compiled src/xep0405.erl
Compiled src/http_upload.erl
Compiled src/xep0191.erl
Compiled src/xmpp_uri.erl
Compiled src/xep0297.erl
Compiled src/xmpp_sasl_scram.erl
Compiled src/xep0319.erl
Compiled src/xep0198.erl
Compiled src/xep0158.erl
Compiled src/jid.erl
Compiled src/xep0359.erl
Compiled src/xep0049.erl
Compiled src/xep0234.erl
Compiled src/xep0047.erl
Compiled src/pubsub_subscribe_options.erl
Compiled src/xep0357.erl
Compiled src/xep0184.erl
Compiled src/xep0417.erl
Compiled src/xep0078.erl
Compiled src/xmpp_stream_in.erl
Compiled src/pubsub_subscribe_authorization.erl
Compiled src/xep0004.erl
Compiled src/xep0279.erl
Compiled src/xep0313.erl
Compiled src/xep0115.erl
Compiled src/xep0202.erl
Compiled src/xep0328.erl
Compiled src/xep0092.erl
Compiled src/xep0084.erl
Compiled src/rfc3921.erl
Compiled src/xep0055.erl
Compiled src/xep0261.erl
Compiled src/xmpp_codec_external.erl
Compiled src/xmpp_codec.erl
Compiled src/mam_query.erl
Compiled src/xep0012.erl
Compiled src/xep0221.erl
Compiled src/xep0131.erl
Compiled src/captcha_form.erl
Compiled src/xmpp_sup.erl
Compiled src/rfc6121.erl
Compiled src/xep0138.erl
Compiled src/xep0377.erl
Compiled src/xep0039.erl
Compiled src/muc_roomconfig.erl
Compiled src/xep0352.erl
Compiled src/xep0355.erl
Compiled src/xep0166.erl
Compiled src/xep0203.erl
Compiled src/xep0114.erl
Compiled src/xep0045.erl
Compiled src/xmpp_config.erl
Compiled src/xep0030.erl
Compiled src/xep0369.erl
Compiled src/xep0231.erl
Compiled src/scram.erl
Compiled src/xep0060.erl
Compiled src/xep0153.erl
Compiled src/pubsub_meta_data.erl
Compiled src/xmpp_stream.erl
Compiled src/xep0066.erl
Compiled src/xep0077.erl
Compiled src/xmpp_stream_pkix.erl
Compiled src/xmpp_sasl_plain.erl
Compiled src/xep0013.erl
Compiled src/xep0260.erl
Compiled src/xep0085.erl
Compiled src/xep0054.erl
Compiling c_src/jid.c
Compiling c_src/xmpp_uri.c
Compiling c_src/xmpp_lang.c
==> fast_yaml (compile)
Compiled src/fast_yaml_app.erl
Compiled src/fast_yaml_sup.erl
Compiled src/fast_yaml.erl
Compiling c_src/fast_yaml.c
==> yconf (compile)
Compiled src/yconf.erl
==> jiffy (compile)
Compiling c_src/decoder.c
Compiling c_src/encoder.c
Compiling c_src/jiffy.c
Compiling c_src/termstack.c
Compiling c_src/utf8.c
Compiling c_src/util.c
Compiling c_src/doubles.cc
Compiling c_src/objects.cc
Compiling c_src/double-conversion/bignum-dtoa.cc
Compiling c_src/double-conversion/bignum.cc
Compiling c_src/double-conversion/cached-powers.cc
Compiling c_src/double-conversion/diy-fp.cc
Compiling c_src/double-conversion/double-conversion.cc
Compiling c_src/double-conversion/fast-dtoa.cc
Compiling c_src/double-conversion/fixed-dtoa.cc
Compiling c_src/double-conversion/strtod.cc
/usr/bin/ld: unrecognized option '-plugin'
/usr/bin/ld: use the --help option for usage information
c++: error: linker command failed with exit code 1 (use -v to see invocation)
sh(c++ c_src/decoder.o c_src/encoder.o c_src/jiffy.o c_src/termstack.o c_src/utf8.o c_src/util.o c_src/doubles.o c_src/objects.o c_src/double-conversion/bignum-dtoa.o c_src/doub
le-conversion/bignum.o c_src/double-conversion/cached-powers.o c_src/double-conversion/diy-fp.o c_src/double-conversion/double-conversion.o c_src/double-conversion/fast-dtoa.o c
_src/double-conversion/fixed-dtoa.o c_src/double-conversion/strtod.o -L/usr/local/lib -Wl,-rpath,/usr/local/lib -fstack-protector-strong  -flto -lstdc++ -flto -lstdc++ -shared  
-L"/usr/local/lib/erlang/lib/erl_interface-3.11.3/lib" -lerl_interface -lei -o priv/jiffy.so)
failed with return code 1 and the following output:
/usr/bin/ld: unrecognized option '-plugin'
/usr/bin/ld: use the --help option for usage information
c++: error: linker command failed with exit code 1 (use -v to see invocation)

ERROR: Command [compile] failed!
gmake[2]: *** [Makefile:112: deps/.built] Error 1
gmake[2]: Leaving directory '/var/ports/basejail/usr/ports/net-im/ejabberd/work/ejabberd-20.03'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /basejail/usr/ports/net-im/ejabberd
*** Error code 1

Stop.
make: stopped in /basejail/usr/ports/net-im/ejabberd

===>>> make build failed for net-im/ejabberd
===>>> Aborting update


===>>> You can restart from the point of failure with this command line:
       portmaster <flags> net-im/ejabberd 

This command has been saved to ~/portmasterfail.txt
Comment 1 dewayne 2020-04-08 00:20:37 UTC
Can you remove the link-time optimisation?  (-flto)
FYI: I successfully built ejabberd on both i386 and amd64 on 27th March.
Comment 2 Ashish SHUKLA freebsd_committer freebsd_triage 2020-04-08 03:08:48 UTC
(In reply to dewayne from comment #1)

Indeed the problem seems to be their custom compiler/linker flags. Thanks for noticing it.

(In reply to Bernhard from comment #0)

Could you please share the output of: 

make -C /basejail/usr/ports/net-im/ejabberd -V CFLAGS -V CXXFLAGS -V LDFLAGS

Thanks!
Comment 3 Bernhard 2020-04-08 06:34:50 UTC
Thanks for responding so quickly!

root@jabber-1:~ # make -C /basejail/usr/ports/net-im/ejabberd -V CFLAGS -V CXXFLAGS -V LDFLAGS
-O2 -pipe  -I/usr/local/include -fstack-protector-strong -fno-strict-aliasing 
-O2 -pipe -I/usr/local/include -fstack-protector-strong -fno-strict-aliasing  
 -L/usr/local/lib -Wl,-rpath,/usr/local/lib -fstack-protector-strong
Comment 4 Ashish SHUKLA freebsd_committer freebsd_triage 2020-04-08 08:00:56 UTC
(In reply to Bernhard from comment #3)

Thanks, I'm also able to reproduce it on a friend's 11.x host.
Comment 5 Ashish SHUKLA freebsd_committer freebsd_triage 2020-04-08 12:29:25 UTC
Created attachment 213191 [details]
Probable fix

Could you give this attached diff a try, and see if it works for you ?

Thanks!
Comment 6 Bernhard 2020-04-08 13:09:02 UTC
I can confirm, that your patch worked me!
Comment 7 commit-hook freebsd_committer freebsd_triage 2020-04-08 13:14:16 UTC
A commit references this bug:

Author: ashish
Date: Wed Apr  8 13:14:04 UTC 2020
New revision: 531114
URL: https://svnweb.freebsd.org/changeset/ports/531114

Log:
  - Fix brokenness on 11.x due to lack of LTO support, required by one
    of the dependency

  Thanks to dewayne@heuristicsystems.com.au for pointing out
  the issue

  PR:		245428
  Reported by:	Bernhard <bernhard.kneip@postadigitale.de>, pkg-fallout@

Changes:
  head/net-im/ejabberd/Makefile
Comment 8 Ashish SHUKLA freebsd_committer freebsd_triage 2020-04-08 13:16:15 UTC
Committed, Thanks!
Comment 9 dewayne 2020-04-13 03:45:43 UTC
(In reply to Ashish SHUKLA from comment #8)
Ashish, I'm not quite sure why you restricted the fix to pre 12 systems. I'd just updated my port build and ejabberd failed to build on my 12.1Stable amd64 system.  Commenting out the test which enables lto to be removed, and my build succeed :)
Comment 10 Ashish SHUKLA freebsd_committer freebsd_triage 2020-04-13 03:58:11 UTC
(In reply to dewayne from comment #9)

This is weird. The ld shipped with 12.1-RELEASE (lld 8.0.1) supports -plugin option, and I believe lld 9.0.1 which is shipped with 12.1-STABLE supports it too.

Could you provide the output of:

   % cat >hello.c <<EOF
   #include <stdio.h>
   int main() { puts("Hello"); }
   EOF

   % cc -v -flto -o hello hello.c

I tested on a 12.1-STABLE host and seems to work fine for me.

   12.1-STABLE FreeBSD 12.1-STABLE #0 r356856: Sat Jan 18 03:52:01 UTC 2020

Thanks!
Comment 11 dewayne 2020-04-13 07:39:28 UTC
(In reply to Ashish SHUKLA from comment #10)
Thank-you.  Yes I get a good result in my base system but not in the jail.  Please disregard my suggestion.  I think I have a damaged jail.  (which is going to take some time to sort out).

I appreciate your example.  :)

# cc -v -flto -o hello hello.c
FreeBSD clang version 9.0.1 (git@github.com:llvm/llvm-project.git c1a0a213378a458fbea1a5c77b3 15c7dce08fd05) (based on LLVM 9.0.1)
Target: x86_64-unknown-freebsd12.1
Thread model: posix
InstalledDir: /usr/bin
 "/usr/bin/cc" -cc1 -triple x86_64-unknown-freebsd12.1 -emit-llvm-bc -flto -flto-unit -disabl e-free -disable-llvm-verifier -discard-value-names -main-file-name hello.c -mrelocation-model  static -mthread-model posix -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-t ables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -v -resourc e-dir /usr/lib/clang/9.0.1 -fdebug-compilation-dir /tmp -ferror-limit 19 -fmessage-length 93  -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -faddrsig -o /tmp/hello- 5d5a14.o -x c hello.c
clang -cc1 version 9.0.1 based upon LLVM 9.0.1 default target x86_64-unknown-freebsd12.1
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/clang/9.0.1/include
 /usr/include
End of search list.
 "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable -new-dtags -o hello /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib -plugin /u sr/bin/../lib/LLVMgold.so -plugin-opt=mcpu=x86-64 /tmp/hello-5d5a14.o -lgcc --as-needed -lgcc _s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crt n.o

./hello
Hello