Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Problem on 64 bit ubuntu 12.04 #18

Closed
stuaxo opened this Issue · 5 comments

3 participants

@stuaxo

Make seems to be looking in the wrong place for some of the java libs (or a place I don't have them).

(2d)stu@beezlebub:~/projects/external/pyjnius$ ls /usr/lib/jvm/jdk1.7.0_04/
bin  COPYRIGHT  db  include  jre  lib  LICENSE  man  README.html  release  src.zip  THIRDPARTYLICENSEREADME.txt
(2d)stu@beezlebub:~/projects/external/pyjnius$ ls /usr/lib/jvm/jdk1.7.0_04/lib/
ct.sym  dt.jar  ir.idl  jconsole.jar  jexec  orb.idl  sa-jdi.jar  tools.jar  visualvm
(2d)stu@beezlebub:~/projects/external/pyjnius$ 

Here's the output of make

(2d)stu@beezlebub:~/projects/external/pyjnius$ make
python setup.py build_ext --inplace -f
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running build_ext
building 'jnius' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/lib/jvm/jdk1.7.0_04/include -I/usr/lib/jvm/jdk1.7.0_04/include/linux -I/usr/include/python2.7 -c jnius/jnius.c -o build/temp.linux-x86_64-2.7/jnius/jnius.o
jnius/jnius.c: In function ‘__pyx_pf_5jnius_13MetaJavaClass_2resolve_class’:
jnius/jnius.c:7025:13: warning: variable ‘__pyx_v_meta’ set but not used [-Wunused-but-set-variable]
jnius/jnius.c: In function ‘__pyx_pf_5jnius_9JavaField___cinit__’:
jnius/jnius.c:9458:13: warning: variable ‘__pyx_v_definition’ set but not used [-Wunused-but-set-variable]
jnius/jnius.c: In function ‘__pyx_pf_5jnius_10JavaMethod___cinit__’:
jnius/jnius.c:11061:13: warning: variable ‘__pyx_v_definition’ set but not used [-Wunused-but-set-variable]
jnius/jnius.c: In function ‘__pyx_pf_5jnius_18JavaMultipleMethod___cinit__’:
jnius/jnius.c:13182:13: warning: variable ‘__pyx_v_definition’ set but not used [-Wunused-but-set-variable]
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/jnius/jnius.o -L/usr/lib/jvm/jdk1.7.0_04/lib/amd64/server -ljvm -o /home/stu/projects/external/pyjnius/jnius/jnius.so -Wl,-rpath /usr/lib/jvm/jdk1.7.0_04/lib/amd64/server
gcc: error: /usr/lib/jvm/jdk1.7.0_04/lib/amd64/server: No such file or directory
error: command 'gcc' failed with exit status 1
make: *** [build_ext] Error 1
(2d)stu@beezlebub:~/projects/external/pyjnius$ 
@apalala

I had no problems on the same platform issuing:

$ python setup.py install

There isn't a /usr/lib/jvm/jdk1.7.0_04/lib/ directory on my system.

@tshirtman
Owner

Did you install this jdk manually? i had issues with my own sun^W oracle java installation on first try, but as i had installed it as an alternatives (/etc/alternatives) i just had to jump to the openjdk java and all went fine.

@stuaxo

I did install it manually... added as an alternative though. I'll try the openjdk when I get a chance.

@tshirtman
Owner

updates on this? works with openjdk?

@stuaxo

Hi,
Sorry for the delay - it did work.

I installed openjdk and set it using alternatives:

# sudo apt-get install openjdk-7-jdk

# sudo update-alternatives --config java

  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1051      auto mode
  1            /usr/lib/jvm/java-6-sun/jre/bin/java             63        manual mode
* 2            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1051      manual mode
  3            /usr/lib/jvm/java-7-oracle/jre/bin/java          65        manual mode
  4            /usr/local/java/jdk1.7.0_03/bin/java             1         manual mode

Press enter to keep the current choice[*], or type selection number: 
@stuaxo stuaxo closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.