Bug 709955 - js-1.8.5 is missing header prmjtime.h
Summary: js-1.8.5 is missing header prmjtime.h
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: js
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pavel Alexeev
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 712304 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-02 05:37 UTC by Kieron Briggs
Modified: 2011-07-02 07:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-24 06:42:41 UTC
Type: ---


Attachments (Terms of Use)

Description Kieron Briggs 2011-06-02 05:37:42 UTC
Description of problem:

/usr/include/jscntxt.h from js-devel #include's "prmjtime.h" which is not present in js-devel or any of its dependencies.


Version-Release number of selected component (if applicable):

js-1.8.5-4


How reproducible:

Always


Steps to Reproduce:
1. With js-devel installed:
    $ rpm -q js js-devel
    js-1.8.5-4.fc15.x86_64
    js-devel-1.8.5-4.fc15.x86_64

2. Write a trivial test file:
    $ cat foo.cc
    #include <cstdio>
    #include <jsregexp.h>
    void foo() { printf("Hello, world\n"); }

3. Attempt to compile
    $ g++ `pkg-config --cflags libjs` -Wall -c -o foo.o foo.cc
  
Actual results:

Compiler (preprocessor) error:
    In file included from /usr/include/jsregexp.h:48:0,
                     from foo.cc:2:
    /usr/include/jscntxt.h:75:22: fatal error: prmjtime.h: No such file or directory
    compilation terminated.


Expected results:

Successful compilation.


Additional info:

Comment 1 Pavel Alexeev 2011-06-16 10:54:22 UTC
Thank you for the bugreport.

Comment 2 Pavel Alexeev 2011-06-16 10:54:38 UTC
*** Bug 712304 has been marked as a duplicate of this bug. ***

Comment 3 Jim Meyering 2011-06-16 11:22:13 UTC
In the bug report, https://bugzilla.redhat.com/show_bug.cgi?id=712304
that has just been closed as a duplicate, I included a patch
for the bug in the spec file that causes this missing header.

Please apply that patch or something similar.

Comment 4 Pavel Alexeev 2011-06-23 15:05:40 UTC
Jim, thank very much for the bugreport and patch. I'll plan revisit it and merge! Just your bugreport was duplicate of problem.

Comment 5 Pavel Alexeev 2011-06-24 06:42:41 UTC
Thanks for the report.
Fix in rawhide: http://koji.fedoraproject.org/koji/taskinfo?taskID=3157671 please test.

Comment 6 Jim Meyering 2011-06-24 09:15:17 UTC
Thanks.  I tried http://koji.fedoraproject.org/koji/taskinfo?taskID=3157671
but it still has problems:

First, I doubt you intended to install headers both in
/usr/include *and* in /usr/include/js:

    $ rpm -ql js-devel|grep jsapi.h
    /usr/include/js/jsapi.h
    /usr/include/jsapi.h

Second, jslock.h includes four pr*.h files from nspr4/,
yet does not prefix those file names with the directory,
so any use of jslock.h fails like this:

    In file included from /usr/include/jsobj.h:63:0,
                     from scripting/engine_spidermonkey.h:45,
                     from scripting/engine_spidermonkey.cpp:19:
    /usr/include/jslock.h:47:21: fatal error: pratom.h: No such file or directory
    compilation terminated.

To kludge around it, I modified the header directly with
this command:

    perl -pi.bak -e 's,ude "pr,ude "nspr4/pr,' /usr/include/jslock.h

That induced this diff:

$ diff -u /usr/include/jslock.h{.bak,}  
--- /usr/include/jslock.h.bak   2011-06-24 08:40:44.000000000 +0200
+++ /usr/include/jslock.h       2011-06-24 10:57:23.900005761 +0200
@@ -44,10 +44,10 @@
 #include "jsprvtd.h"
 
 #ifdef JS_THREADSAFE
-# include "pratom.h"
-# include "prlock.h"
-# include "prcvar.h"
-# include "prthread.h"
+# include "nspr4/pratom.h"
+# include "nspr4/prlock.h"
+# include "nspr4/prcvar.h"
+# include "nspr4/prthread.h"
 #endif
 
 JS_BEGIN_EXTERN_C

Comment 7 Pavel Alexeev 2011-07-02 07:55:39 UTC
Check that build:
http://koji.fedoraproject.org/koji/taskinfo?taskID=3175303


Note You need to log in before you can comment on or make changes to this bug.