unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* javadoc not in jdk?
@ 2021-02-27 11:00 Phil
  2021-02-27 11:14 ` Vincent Legoll
  0 siblings, 1 reply; 4+ messages in thread
From: Phil @ 2021-02-27 11:00 UTC (permalink / raw)
  To: help-guix

Hi all,

I'm trying to create a package for python-jcc:
https://pypi.org/project/JCC/

I've overcome a few hurdles, but am now stuck on a seemingly simple
question.

javadoc doesn't appear to be part of the openjdk or icedtea packages (I
think this unusual?).

Could anyone suggest the canonical way to get javadoc installed on Guix?

For context my draft attempt at packaging JCC with build error below.  I
know it finds the correct JDK location because it passes the find JDK
test.  Also I can show at the command line that javadoc doesn't exist by
using -K to keep the build and setting the 'environment_variables'
script in /tmp.

Finally installing openjdk or icedtea into a profile has no javadoc
accessible on the profile PATH.

Any ideas?


Thanks,
Phil.

(define-public python-jcc
  (package
    (name "python-jcc")
    (version "3.8")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "JCC" version))
       (sha256
        (base32
         "1wbyd2srj89116j0d7dnkw8ricli8r1h2pr7nj1kq97miwdh6l96"))))
    (build-system python-build-system)
    (native-inputs
     `(("openjdk" ,openjdk14)))
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'build 'set-JCC_JDK
           ;; should find this programatically?
           (lambda _ (setenv "JCC_JDK" "/gnu/store/s2w6bfrc3nqghpqpcryz4l5h86gsvqvz-openjdk-14.0") #t)))))
    (home-page "https://lucene.apache.org/pylucene/jcc/index.html")
    (synopsis
     "a C++ code generator for calling Java from C++/Python")
    (description
     "a C++ code generator for calling Java from C++/Python")
    (license #f)))


starting phase `set-JCC_JDK'
phase `set-JCC_JDK' succeeded after 0.0 seconds
starting phase `build'
running "python setup.py" with command "build" and parameters ()
Applied shared mode monkeypatch to: <module 'setuptools' from '/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/site-packages/setuptools/__init__.py'>
Traceback (most recent call last):
  File "setup.py", line 413, in main
    process = Popen(args, stderr=PIPE)
  File "/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/gnu/store/q9rm8h9imazsq2c4qiv2yjpvlvliywqb-python-3.8.2/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'javadoc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 461, in <module>
    main('--debug' in sys.argv)
  File "setup.py", line 415, in main
    raise sys.exc_info()[0]("%s: %s" %(sys.exc_info()[1], args))
FileNotFoundError: [Errno 2] No such file or directory: 'javadoc': ['javadoc', '-d', 'javadoc', '-sourcepath', 'java', 'org.apache.jcc']
command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "build" failed with status 1
builder for `/gnu/store/hshh3jkfdzv1lv8yqvvb4gbxza7ygv46-python-jcc-3.8.drv' failed with exit code 1
build of /gnu/store/hshh3jkfdzv1lv8yqvvb4gbxza7ygv46-python-jcc-3.8.drv failed


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: javadoc not in jdk?
  2021-02-27 11:00 javadoc not in jdk? Phil
@ 2021-02-27 11:14 ` Vincent Legoll
  2021-02-27 12:38   ` Julien Lepiller
  2021-02-27 13:35   ` Phil
  0 siblings, 2 replies; 4+ messages in thread
From: Vincent Legoll @ 2021-02-27 11:14 UTC (permalink / raw)
  To: Phil; +Cc: help-guix

Hello,

you should try adding the "doc" output from the jdk

see https://guix.gnu.org/manual/en/guix.html#Packages-with-Multiple-Outputs

something like the following:

     (native-inputs
      `(("openjdk" ,openjdk14)
         ("jdk-doc" ,openjdk:doc)))

Tchuss

-- 
Vincent Legoll


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: javadoc not in jdk?
  2021-02-27 11:14 ` Vincent Legoll
@ 2021-02-27 12:38   ` Julien Lepiller
  2021-02-27 13:35   ` Phil
  1 sibling, 0 replies; 4+ messages in thread
From: Julien Lepiller @ 2021-02-27 12:38 UTC (permalink / raw)
  To: help-guix, Vincent Legoll, Phil; +Cc: help-guix

The syntax would be ("jdk-doc" ,openjdk "doc"), but if you mean the javadoc program, then it's the "jdk" output, which also contains the java compiler (icedtea and openjdk only contain java, not javac).

Le 27 février 2021 06:14:43 GMT-05:00, Vincent Legoll <vincent.legoll@gmail.com> a écrit :
>Hello,
>
>you should try adding the "doc" output from the jdk
>
>see
>https://guix.gnu.org/manual/en/guix.html#Packages-with-Multiple-Outputs
>
>something like the following:
>
>     (native-inputs
>      `(("openjdk" ,openjdk14)
>         ("jdk-doc" ,openjdk:doc)))
>
>Tchuss
>
>-- 
>Vincent Legoll

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: javadoc not in jdk?
  2021-02-27 11:14 ` Vincent Legoll
  2021-02-27 12:38   ` Julien Lepiller
@ 2021-02-27 13:35   ` Phil
  1 sibling, 0 replies; 4+ messages in thread
From: Phil @ 2021-02-27 13:35 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: help-guix


Vincent Legoll writes:

> you should try adding the "doc" output from the jdk
>
> see https://guix.gnu.org/manual/en/guix.html#Packages-with-Multiple-Outputs

Thanks that was the clue I needed - for future readers the exact
solution was:

(native-inputs `(("openjdk:jdk" ,openjdk14 "jdk")))

javadoc is in the jdk, not the doc output.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-27 13:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-27 11:00 javadoc not in jdk? Phil
2021-02-27 11:14 ` Vincent Legoll
2021-02-27 12:38   ` Julien Lepiller
2021-02-27 13:35   ` Phil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).