Bug 220796 - lang/spidermonkey185: Fails to build when devel/readline is built without TERMCAP option
Summary: lang/spidermonkey185: Fails to build when devel/readline is built without TER...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kubilay Kocak
Keywords: needs-qa
Depends on:
Reported: 2017-07-17 10:57 UTC by Miroslav Lachman
Modified: 2020-12-31 18:53 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback+

Poudriere bulk build log failure (58.08 KB, application/x-gzip)
2017-07-17 10:57 UTC, Miroslav Lachman
no flags Details
svn-diff-spidermonkey185 (1.54 KB, patch)
2019-09-11 19:05 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Lachman 2017-07-17 10:57:46 UTC
Created attachment 184428 [details]
Poudriere bulk build log failure

Cannot upgrade / build Spidermonkey185 in our Poudriere. 
It throws 33 warnings and then end up with error:

33 warnings generated.
c++ -o js  -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -pedantic -Wno-long-long -O2 -pipe -DJS_C_STRINGS_ARE_UTF8 -fstack-protector -fno-strict-aliasing -fno-strict-aliasing -pipe  -DNDEBUG -DTRIMMED -O  js.o   -pthread  -fstack-protector  -Wl,-rpath-link,/bin -Wl,-rpath-link,/usr/local/lib  -L../dist/bin -L../dist/lib -L/usr/local/lib -lplds4 -lplc4 -lnspr4 -pthread -lreadline ../libjs_static.a     
/usr/local/lib/libreadline.so: undefined reference to `PC'
/usr/local/lib/libreadline.so: undefined reference to `tgetflag'
/usr/local/lib/libreadline.so: undefined reference to `tgetent'
/usr/local/lib/libreadline.so: undefined reference to `UP'
/usr/local/lib/libreadline.so: undefined reference to `tputs'
/usr/local/lib/libreadline.so: undefined reference to `tgoto'
/usr/local/lib/libreadline.so: undefined reference to `tgetnum'
/usr/local/lib/libreadline.so: undefined reference to `BC'
/usr/local/lib/libreadline.so: undefined reference to `tgetstr'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [../config/rules.mk:1024: js] Error 1
gmake[3]: Leaving directory '/wrkdirs/usr/ports/lang/spidermonkey185/work/js-1.8.5/js/src/shell'
gmake[2]: *** [config/rules.mk:909: libs] Error 2
gmake[2]: Leaving directory '/wrkdirs/usr/ports/lang/spidermonkey185/work/js-1.8.5/js/src'
gmake[1]: *** [config/rules.mk:754: all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/lang/spidermonkey185/work/js-1.8.5/js/src'
*** Error code 1

make: stopped in /usr/ports/lang/spidermonkey185
====>> Cleaning up wrkdir
===>  Cleaning for spidermonkey185-1.8.5_4
build of lang/spidermonkey185 ended at Fri Jul 14 17:51:07 CEST 2017
build time: 00:04:33
!!! build failure encountered !!!

Full log attached

The make.conf contains



DEFAULT_VERSIONS=apache=2.4 perl5=5.24 mysql=10.1m php=5.6 python=2.7 python3=3.5 pgsql=9.4 ssl=openssl

Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2017-07-18 12:30:49 UTC
The official FreeBSD package builders appears successfully build:


Note the same 33 warnings appear in the log:

33 warnings generated.
c++ -o js  -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -pedantic -Wno-long-long -O2 -pipe -fstack-protector -fno-strict-aliasing -fno-strict-aliasing -pipe  -DNDEBUG -DTRIMMED -O  js.o   -pthread  -fstack-protector  -Wl,-rpath-link,/bin -Wl,-rpath-link,/usr/local/lib  -L../dist/bin -L../dist/lib -L/usr/local/lib -lplds4 -lplc4 -lnspr4 -pthread -lreadline ../libjs_static.a     

The missing references relate to readline and its need for symbols that come from either ncurses or termcap (depending on how things are built)

Can you please confirm for me which OPTIONS are being used for both spidermonkey185 and readline ports, and if any OPTIONS are modified from their default values, revert those and confirm whether or not symptoms are still reproducible
Comment 2 Miroslav Lachman 2017-07-18 13:52:24 UTC
(In reply to Kubilay Kocak from comment #1)

Thank you for the pointer!
I had this options for readline

# This file is auto-generated by 'make config'.
# Options for readline-6.3.8

I changed it to OPTIONS_FILE_SET+=TERMCAP and bulk build works again.

The question is - why it is failing now if it was OK for a long time before with unset TERMCAP?

Is there some way to check and warn users of spidermonkey185 that it needs readline with TERMCAP on?

As my problem is solved, you can close this PR if you want.
Comment 3 Walter Schwarzenfeld freebsd_triage 2018-01-22 08:41:45 UTC
TERMCAP is per default ON. Could we close here?
Comment 4 Miroslav Lachman 2018-01-22 10:53:36 UTC
(In reply to w.schwarzenfeld from comment #3)
What? If there is an option and it does not work, then it is a bug and should be fixed or option removed. Regardless of default settings.
Defaults are just ... defaults for pkg build cluster.
Comment 5 Walter Schwarzenfeld freebsd_triage 2018-01-22 11:33:42 UTC
Something other
The Makefile has a typo
DEBUG_CONFIGURE_ON=     --enable-debug-sumbols
Comment 6 Walter Schwarzenfeld freebsd_triage 2019-09-11 04:21:44 UTC
I had another problem: It does not configure if readline is build without TERMCAP.

But I got it to build, if I add to the Makefile:

LIBS+=  -lreadline -ltinfo
Comment 7 Walter Schwarzenfeld freebsd_triage 2019-09-11 19:05:54 UTC
Created attachment 207394 [details]

I hope this is right.
Comment 8 Rene Ladan freebsd_committer 2020-12-31 18:53:30 UTC
This is an old version of spidermonkey which is python27-only, please use a recent version.