Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not installing #84

Closed
nesergen opened this issue Nov 7, 2013 · 6 comments
Closed

Not installing #84

nesergen opened this issue Nov 7, 2013 · 6 comments

Comments

@nesergen
Copy link

nesergen commented Nov 7, 2013

ubuntu 12.04 . openjdk7, Cython
I have tried to install pyjnius. After executing "make" i have this:

javac jnius/src/org/jnius/NativeInvocationHandler.java
python setup.py build_ext --inplace -f -g
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running build_ext
cythoning jnius/jnius.pyx to jnius/jnius.c
warning: jnius/jnius.pyx:2:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead
building 'jnius' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -g -I/usr/lib/jvm/java-7-openjdk-amd64/include -I/usr/lib/jvm/java-7-openjdk-amd64/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_f_5jnius_get_jnienv’:
jnius/jnius.c:3295:3: warning: passing argument 2 of ‘(*__pyx_v_5jnius_jvm)->AttachCurrentThread’ from incompatible pointer type [enabled by default]
jnius/jnius.c:3295:3: note: expected ‘void **’ but argument is of type ‘const struct JNINativeInterface_ ***’
jnius/jnius.c: In function ‘__pyx_pf_5jnius_13MetaJavaClass_4resolve_class’:
jnius/jnius.c:12922:30: warning: assignment from incompatible pointer type [enabled by default]
jnius/jnius.c:12931:30: warning: assignment from incompatible pointer type [enabled by default]
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g build/temp.linux-x86_64-2.7/jnius/jnius.o -L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server -ljvm -o /home/sergen/Загрузки/pyjnius-master/jnius/jnius.so -Wl,-rpath /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server

After executing "make tests" i have this:

javac jnius/src/org/jnius/NativeInvocationHandler.java
python setup.py build_ext --inplace -f -g
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running build_ext
cythoning jnius/jnius.pyx to jnius/jnius.c
warning: jnius/jnius.pyx:2:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead
building 'jnius' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -g -I/usr/lib/jvm/java-7-openjdk-amd64/include -I/usr/lib/jvm/java-7-openjdk-amd64/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_f_5jnius_get_jnienv’:
jnius/jnius.c:3295:3: warning: passing argument 2 of ‘(*__pyx_v_5jnius_jvm)->AttachCurrentThread’ from incompatible pointer type [enabled by default]
jnius/jnius.c:3295:3: note: expected ‘void **’ but argument is of type ‘const struct JNINativeInterface_ ***’
jnius/jnius.c: In function ‘__pyx_pf_5jnius_13MetaJavaClass_4resolve_class’:
jnius/jnius.c:12922:30: warning: assignment from incompatible pointer type [enabled by default]
jnius/jnius.c:12931:30: warning: assignment from incompatible pointer type [enabled by default]
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g build/temp.linux-x86_64-2.7/jnius/jnius.o -L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server -ljvm -o /home/sergen/Загрузки/pyjnius-master/jnius/jnius.so -Wl,-rpath /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server
cd tests && javac org/jnius/HelloWorld.java
cd tests && javac org/jnius/BasicsTest.java
cd tests && javac org/jnius/MultipleMethods.java
cd tests && javac org/jnius/SimpleEnum.java
cd tests && javac org/jnius/InterfaceWithPublicEnum.java
cd tests && javac org/jnius/ClassArgument.java
cd tests && env PYTHONPATH=..: nosetests-2.7 -v
env: nosetests-2.7: No such file or directory
make: *** [tests] Error 127

I think there are some problems?

@tshirtman
Copy link
Member

Did you try installing nosetest in your venv?

On Thu, Nov 07, 2013 at 09:22:55AM -0800, nesergen wrote:

i have tried to install pyjnius. After executing "make" i have this:
"""
javac jnius/src/org/jnius/NativeInvocationHandler.java
python setup.py build_ext --inplace -f -g
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running build_ext
cythoning jnius/jnius.pyx to jnius/jnius.c
warning: jnius/jnius.pyx:2:0: getslice, setslice, and delslice are not supported by Python 3, use getitem, setitem, and delitem instead
building 'jnius' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -g -I/usr/lib/jvm/java-7-openjdk-amd64/include -I/usr/lib/jvm/java-7-openjdk-amd64/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_f_5jnius_get_jnienv’:
jnius/jnius.c:3295:3: warning: passing argument 2 of ‘(_pyx_v_5jnius_jvm)->AttachCurrentThread’ from incompatible pointer type [enabled by default]
jnius/jnius.c:3295:3: note: expected ‘void *
’ but argument is of type ‘const struct JNINativeInterface
***’
jnius/jnius.c: In function ‘__pyx_pf_5jnius_13MetaJavaClass_4resolve_class’:
jnius/jnius.c:12922:30: warning: assignment from incompatible pointer type [enabled by default]
jnius/jnius.c:12931:30: warning: assignment from incompatible pointer type [enabled by default]
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g build/temp.linux-x86_64-2.7/jnius/jnius.o -L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server -ljvm -o /home/sergen/Загрузки/pyjnius-master/jnius/jnius.so -Wl,-rpath /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server
"""

After executing "make tests" i have this:
"""
javac jnius/src/org/jnius/NativeInvocationHandler.java
python setup.py build_ext --inplace -f -g
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running build_ext
cythoning jnius/jnius.pyx to jnius/jnius.c
warning: jnius/jnius.pyx:2:0: getslice, setslice, and delslice are not supported by Python 3, use getitem, setitem, and delitem instead
building 'jnius' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -g -I/usr/lib/jvm/java-7-openjdk-amd64/include -I/usr/lib/jvm/java-7-openjdk-amd64/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_f_5jnius_get_jnienv’:
jnius/jnius.c:3295:3: warning: passing argument 2 of ‘(_pyx_v_5jnius_jvm)->AttachCurrentThread’ from incompatible pointer type [enabled by default]
jnius/jnius.c:3295:3: note: expected ‘void *
’ but argument is of type ‘const struct JNINativeInterface
**’
jnius/jnius.c: In function ‘__pyx_pf_5jnius_13MetaJavaClass_4resolve_class’:
jnius/jnius.c:12922:30: warning: assignment from incompatible pointer type [enabled by default]
jnius/jnius.c:12931:30: warning: assignment from incompatible pointer type [enabled by default]
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g build/temp.linux-x86_64-2.7/jnius/jnius.o -L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server -ljvm -o /home/sergen/Загрузки/pyjnius-master/jnius/jnius.so -Wl,-rpath /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server
cd tests && javac org/jnius/HelloWorld.java
cd tests && javac org/jnius/BasicsTest.java
cd tests && javac org/jnius/MultipleMethods.java
cd tests && javac org/jnius/SimpleEnum.java
cd tests && javac org/jnius/InterfaceWithPublicEnum.java
cd tests && javac org/jnius/ClassArgument.java
cd tests && env PYTHONPATH=..: nosetests-2.7 -v
env: nosetests-2.7: No such file or directory
make: *
* [tests] Error 127
"""


Reply to this email directly or view it on GitHub:
#84

@nesergen
Copy link
Author

nesergen commented Nov 9, 2013

I don`t know what is venv. I run command "make" by terminal from directory where package is situated , like in README.md wrote .

@akshayaurora
Copy link
Member

Could you please try with python2, pyjnius isn't yet py3 compatible.

On Sun, Nov 10, 2013 at 12:51 AM, nesergen notifications@github.com wrote:

I don`t know what is venv. I run command "make" by terminal from directory
where package is situated , like in README.md wrote .


Reply to this email directly or view it on GitHubhttps://github.com//issues/84#issuecomment-28134667
.

@nesergen
Copy link
Author

nesergen commented Nov 9, 2013

Ubuntu 12.04 have Python2.7 by default.
Module "jnius" installed to the PYTHONPATH by :

python setup.py install

The sample in Quick overview work properly.
But command "make tests" have this:

....... @sergen-pc:~/Загрузки/pyjnius-master$ make tests
javac jnius/src/org/jnius/NativeInvocationHandler.java
python setup.py build_ext --inplace -f -g
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running build_ext
cythoning jnius/jnius.pyx to jnius/jnius.c
warning: jnius/jnius.pyx:2:0: getslice, setslice, and delslice are not supported by Python 3, use getitem, setitem, and delitem instead
building 'jnius' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -g -I/usr/lib/jvm/java-7-openjdk-amd64/include -I/usr/lib/jvm/java-7-openjdk-amd64/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_f_5jnius_get_jnienv’:
jnius/jnius.c:3295:3: warning: passing argument 2 of ‘(_pyx_v_5jnius_jvm)->AttachCurrentThread’ from incompatible pointer type [enabled by default]
jnius/jnius.c:3295:3: note: expected ‘void *
’ but argument is of type ‘const struct JNINativeInterface
**’
jnius/jnius.c: In function ‘__pyx_pf_5jnius_13MetaJavaClass_4resolve_class’:
jnius/jnius.c:12922:30: warning: assignment from incompatible pointer type [enabled by default]
jnius/jnius.c:12931:30: warning: assignment from incompatible pointer type [enabled by default]
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g build/temp.linux-x86_64-2.7/jnius/jnius.o -L/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server -ljvm -o /home/sergen/Загрузки/pyjnius-master/jnius/jnius.so -Wl,-rpath /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server
cd tests && javac org/jnius/HelloWorld.java
cd tests && javac org/jnius/BasicsTest.java
cd tests && javac org/jnius/MultipleMethods.java
cd tests && javac org/jnius/SimpleEnum.java
cd tests && javac org/jnius/InterfaceWithPublicEnum.java
cd tests && javac org/jnius/ClassArgument.java
cd tests && env PYTHONPATH=..: nosetests-2.7 -v
env: nosetests-2.7: No such file or directory
make: *
* [tests] Error 127

What result i have to obtain executing "make tests" ?

@akshayaurora
Copy link
Member

I'm sorry. I seem to have responded reading only a few lines of your error code. tshirtman was asking the right question. Try sym linking nosetests to nosetests-2.7

@nesergen
Copy link
Author

I don`t want deal with "make test"-issue. But pyjnius tested with JDBC-driver for H2-DB, work normally. Thanks! Issue closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants