Bug 202246 - sysutils/polkit update fails due to missing definitions for JS data typess in spidermonkey170
Summary: sysutils/polkit update fails due to missing definitions for JS data typess in...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-11 17:03 UTC by rkoberman
Modified: 2017-07-30 14:41 UTC (History)
3 users (show)

See Also:


Attachments
Build log for polkit. (27.69 KB, text/plain)
2015-08-11 17:03 UTC, rkoberman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description rkoberman 2015-08-11 17:03:31 UTC
Created attachment 159772 [details]
Build log for polkit.

Since being locked to spidermonkey170, I can no longer build polkit due to the lack of definitions of several JS data types:
  CC       libpolkit_backend_1_la-polkitbackendjsauthority.lo
In file included from polkitbackendjsauthority.c:42:
In file included from /usr/local/include/jsapi.h:47:
In file included from /usr/local/include/jspubtd.h:45:
/usr/local/include/jstypes.h:248:6: error: "Must define one of XP_BEOS, XP_OS2,
      XP_WIN or XP_UNIX"
#    error "Must define one of XP_BEOS, XP_OS2, XP_WIN or XP_UNIX"
     ^
/usr/local/include/jstypes.h:264:2: error: No suitable type for JSInt8/JSUint8
#error No suitable type for JSInt8/JSUint8
 ^
/usr/local/include/jstypes.h:277:2: error: No suitable type for JSInt16/JSUint16
#error No suitable type for JSInt16/JSUint16
 ^
/usr/local/include/jstypes.h:297:2: error: No suitable type for JSInt32/JSUint32
#error No suitable type for JSInt32/JSUint32

It looks to me like there is no definition of things like JS_BYTES_PER_INT, JS_BYTES_PER_SHORT and JS_BYTES_PER_INT. I further guess it is the lack of the definition of XP_UNIX and possibly others that is triggering this.

I will try to get time to look into this more deeply. I am not sure if it a problem with polkit or spidermonkey at this moment.
Comment 1 rkoberman 2015-08-12 17:06:02 UTC
Problem is that polkit is using the header files found in /usr/local/include/ which are those for spidermonkey17 when it is using spidermonkey170 which puts it's header files into /usr/local/include/js-17.0/. After deleting spidermonkey17, polkit installs correctly. 

I see that config.log does define pkg_cv_LIBJS_CFLAGS and LIBJS_CFLAGS with:
-include /usr/local/include/js-17.0/js/RequiredDefines.h -I/usr/local/include/js-17.0 -I/usr/local/include/nspr
but these do not appear to prevent the inclusion of the header files in /user/include.

Sorry, but my makefu is weak and I am now lost in maze of twisty Makefiles and autotools files.
Comment 2 Pavel Minaev 2016-12-31 03:36:53 UTC
Still repros.
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-07-30 14:35:28 UTC
A commit references this bug:

Author: kwm
Date: Sun Jul 30 14:34:28 UTC 2017
New revision: 446936
URL: https://svnweb.freebsd.org/changeset/ports/446936

Log:
  Move spidermonkey17's headers out of LOCALBASE and in there own subdir. [1]

  This fixes build issues with other spidermonkey using ports when
  SM 1.7 is installed, due to SM 1.7's headers being found first. [2]

  Update SM 1.7 users to take this change into account.

  PR:		219761 [1], 214724 [2], 202246 [2]
  Approved by:	maintainer timeout (nearly 2 months)

Changes:
  head/lang/p5-JavaScript-SpiderMonkey/Makefile
  head/lang/p5-JavaScript-SpiderMonkey/files/patch-Makefile.PL
  head/lang/spidermonkey17/Makefile
  head/net/mediatomb/Makefile
  head/www/elinks/Makefile