JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

rmir - can't dl from remote now
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> JP1 - Software
View previous topic :: View next topic  
Author Message
wnewell



Joined: 13 Jan 2009
Posts: 158
Location: DFW, Texas

                    
PostPosted: Mon Sep 14, 2009 1:26 am    Post subject: Reply with quote

OK, I downloaded the source. Will attempt a 64 bit compile sometime in the next few days hopefully. I've got some other things going right now.
Back to top
View user's profile Send private message
wnewell



Joined: 13 Jan 2009
Posts: 158
Location: DFW, Texas

                    
PostPosted: Mon Sep 14, 2009 2:46 am    Post subject: Reply with quote

Problems with compile. First attempt.

[wes@wes2 jp12]$ gcc -shared -o libjp12serial.so jp12serial.cpp
jp12serial.cpp:175:46: error: com_hifiremote_jp1_io_JP12Serial.h: No such file o
r directory
jp12serial.cpp:300: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:312: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:350: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:882: error: expected constructor, destructor, or type conversion
before ‘void’
jp12serial.cpp:962: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:974: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:986: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:1100: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:1138: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:1180: error: ‘JNIEXPORT’ does not name a type
[wes@wes2 jp12]$ gcc -shared -o libjp12serial.so jp12serial.cpp
/usr/bin/ld: /home/wes/tmp/ccUZJPm6.o: relocation R_X86_64_32 against `a local s
ymbol' can not be used when making a shared object; recompile with -fPIC
/home/wes/tmp/ccUZJPm6.o: could not read symbols: Bad value
collect2: ld returned 1 exit status

Second after commenting out define java line

[wes@wes2 jp12]$ gcc -shared -o libjp12serial.so jp12serial.cpp
/usr/bin/ld: /home/wes/tmp/ccmwveGJ.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/home/wes/tmp/ccmwveGJ.o: could not read symbols: Bad value
collect2: ld returned 1 exit status

Third, adding -fPIC option.

[wes@wes2 jp12]$ gcc -shared -fPIC -o libjp12serial.so jp12serial.cpp

Mind you, I have no idea what these options do, but it did compile using the above options. But, when I ran rmir, I got a pop-up about a non compatible serial driver. Don't remember the exact phrase, but it didn't like the .so file I guess. I don't know where to go from here.
Back to top
View user's profile Send private message
WagonMaster



Joined: 16 Apr 2009
Posts: 361

                    
PostPosted: Mon Sep 14, 2009 1:49 pm    Post subject: Reply with quote

Thanks a bunch for running those tests!

wnewell wrote:
/usr/bin/ld: /home/wes/tmp/ccmwveGJ.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

Sorry... my fault. That '-fPIC' option (to generate Position-Independent Code, which is almost always a wise choice for compiling shared library code) was already in some of the 'make' files that have been floating about by various folks, but I've been hand-compiling the library recently and forgot to include that because it's not really needed in my case. I'll be sure to update that in the comments of my next release. Glad to see you were persistent and got it to compile!

wnewell wrote:
But, when I ran rmir, I got a pop-up about a non compatible serial driver. Don't remember the exact phrase, but it didn't like the .so file I guess. I don't know where to go from here.

If you get a chance, can you see if there's any information near the end of the 'rmaster.err' file, please? I'm hoping that will give us a clue. And if you could report the exact phrase-ology of the pop-up error, I'll obviously have a better chance of tracking down the source and, hopefully, the solution. Actually, I just searched the source code for RM/RMIR and found a likely candidate for your error message:
Code:

"An incompatible version of the " + className + " driver was detected.  You will not be able to download or upload using that driver."

Does this look like the error you were seeing? If so, I'll try to dig a bit deeper as to what's actually triggering this.

On a related note, Slackware 13.0 DVDs (now with a 64-bit version) are now being shipped, so I ordered a copy last night. If I'm lucky, I might have a 64-bit GNU/Linux platform of my own to test with by the coming weekend. Eventually, assuming we don't figure things out through your tests before then, I'll be able to directly try some tests of my own.

Thanks again for your help in testing this!

Regards,
Bill
Back to top
View user's profile Send private message
wnewell



Joined: 13 Jan 2009
Posts: 158
Location: DFW, Texas

                    
PostPosted: Mon Sep 14, 2009 2:23 pm    Post subject: Reply with quote

OK, yes, that was the pop-up error. And there wasn't a serial interface choice when the program came up.. Here's the last part of rmaster.err fwiw. Looks the same as the one using the original serial driver to me.

Loading /home/wes/rm/Linux-amd64/libjp1parallel.so
Loaded /home/wes/rm/Linux-amd64/libjp1parallel.so
Loading /home/wes/rm/Linux-amd64/libjp12serial.so
Loaded /home/wes/rm/Linux-amd64/libjp12serial.so
Loading /home/wes/rm/Linux-amd64/libjp1usb.so
Unable to create JP1USB object: Can't load library: /home/wes/rm/Linux-amd64/libjp1usb.so
Loading /home/wes/rm/Linux-amd64/libDecodeIR.so
Loaded /home/wes/rm/Linux-amd64/libDecodeIR.so

And the start just to comnfirm versions.

RemoteMaster v1.96
System Properties:
java.version = 1.6.0_0
java.vendor = Sun Microsystems Inc.
os.name = Linux
os.arch = amd64
Back to top
View user's profile Send private message
gfb107
Expert


Joined: 03 Aug 2003
Posts: 3411
Location: Cary, NC

                    
PostPosted: Mon Sep 14, 2009 2:51 pm    Post subject: Reply with quote

If you comment out the Java JNI stuff because you don't have Java headers, the .so probably won't have the entry points that RMIR calls, or they won't use the right linkage for RMIR to call them.
_________________
-- Greg
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST)
Back to top
View user's profile Send private message Visit poster's website
WagonMaster



Joined: 16 Apr 2009
Posts: 361

                    
PostPosted: Mon Sep 14, 2009 3:55 pm    Post subject: Reply with quote

gfb107 wrote:
If you comment out the Java JNI stuff because you don't have Java headers, the .so probably won't have the entry points that RMIR calls, or they won't use the right linkage for RMIR to call them.

Doh! (slapping forehead)... Of course, Greg is correct. I read that part earlier in the morning, but didn't compose my post until later, by which time I'd promptly forgotten about your disabling the Java!

Greg is being quite gracious in not saying "I told you so!" because he commented about this exact possibility before I released the sources.

The fault here is again mine. Embarassed

I don't know (or forgot) what Linux distribution you're using, but I suspect that, like me (Slackware 12.1), you may already have the necessary generic Java header files but since I carelessly neglected to include the JP1.x library's sole Java header file ('com_hifiremote_jp1_io_JP12Serial.h') in the zip file, your initial compile is choking on the result of those missing definitions. I don't know how I overlooked including that file in the release!

In my partial defense, Greg, Smile 'wnewell' may not have had to disable the Java compilation if I had been wise enough to include the right header file in the original zip file!

'wnewell', if you're still patient enough to deal with my goofs, please re-download the zip file, discarding your previous sources (including your tweak to disable the Java SDK dependency), and re-build. Hopefully that will either work or get us to the next error in the chain.

Sorry for my oversight. And thanks for being gracious, Greg. Smile

Bill
Back to top
View user's profile Send private message
WagonMaster



Joined: 16 Apr 2009
Posts: 361

                    
PostPosted: Mon Sep 14, 2009 4:18 pm    Post subject: Reply with quote

'wnewell', I should have mentioned this in my last post:

In case you don't have the necessary generic Java header files, you'll need to (assuming you want to deal with the bother) download the Sun Java SDK/JDK for Linux. It's about 81 MB and the one I grabbed and successfully used was a single file named 'jdk-6u16-linux-i586.bin', but there's probably a specific (different) version for a 64-bit platform like yours. I'd give you a URL, but I never can seem to easily figure out my way around the Sun Java site. You can get to it from here. You're looking for what they call the "Java SE Development Kit (JDK)". Click the orange "Download" button, then select your platform ("Linux x64").

I should iterate that with my setup (Slackware 12.1), I never needed the Java SDK/JDK to simply compile the serial library, even with the Java parts enabled (which they are by default). I only needed it to compile RM/RMIR. But you may have a different experience.

Basically, that 81 MB file is a giant self-extracting script file that you give execute permission to and then run it.

Holler if you have any difficulties.

Bill
Back to top
View user's profile Send private message
wnewell



Joined: 13 Jan 2009
Posts: 158
Location: DFW, Texas

                    
PostPosted: Mon Sep 14, 2009 6:29 pm    Post subject: Reply with quote

Here's where I'm at.Sad

[wes@wes2 jp12]$ gcc -shared -fPIC -o libjp12serial.so jp12serial.cpp
In file included from jp12serial.cpp:175:
com_hifiremote_jp1_io_JP12Serial.h:2:17: error: jni.h: No such file or directory
In file included from jp12serial.cpp:175:
com_hifiremote_jp1_io_JP12Serial.h:15: error: ‘JNIEXPORT’ does not name a type
com_hifiremote_jp1_io_JP12Serial.h:23: error: ‘JNIEXPORT’ does not name a type
com_hifiremote_jp1_io_JP12Serial.h:31: error: ‘JNIEXPORT’ does not name a type
com_hifiremote_jp1_io_JP12Serial.h:39: error: ‘JNIEXPORT’ does not name a type
com_hifiremote_jp1_io_JP12Serial.h:47: error: expected constructor, destructor, or type conversion before
‘void’
com_hifiremote_jp1_io_JP12Serial.h:55: error: ‘JNIEXPORT’ does not name a type
com_hifiremote_jp1_io_JP12Serial.h:63: error: ‘JNIEXPORT’ does not name a type
com_hifiremote_jp1_io_JP12Serial.h:71: error: ‘JNIEXPORT’ does not name a type
com_hifiremote_jp1_io_JP12Serial.h:79: error: ‘JNIEXPORT’ does not name a type
com_hifiremote_jp1_io_JP12Serial.h:87: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:300: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:312: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:350: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:882: error: expected constructor, destructor, or type conversion before ‘void’
jp12serial.cpp:962: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:974: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:986: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:1100: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:1138: error: ‘JNIEXPORT’ does not name a type
jp12serial.cpp:1180: error: ‘JNIEXPORT’ does not name a type
[wes@wes2 jp12]$

Prior to this run I completely removed all my java on the system and reinstalled. Tested it by running rm ok. I went as far as copying jni.h and jni_md.h to the source dir. I've got about 6 hours of other things to do. Any ideas? I'll check later. I installed the sun devel package.

[root@wes2 jp12]# locate /jni
/usr/lib/jvm/java-1.6.0-sun-1.6.0.15/include/jni.h
/usr/lib/jvm/java-1.6.0-sun-1.6.0.15/include/linux/jni_md.h
Back to top
View user's profile Send private message
gfb107
Expert


Joined: 03 Aug 2003
Posts: 3411
Location: Cary, NC

                    
PostPosted: Mon Sep 14, 2009 7:40 pm    Post subject: Reply with quote

Try
Code:

g++ −I/usr/lib/jvm/java-1.6.0-sun-1.6.0.15/include −I/usr/lib/jvm/java-1.6.0-sun-1.6.0.15/include/linux -shared -fPIC -o libjp12serial.so jp12serial.cpp


There's probably a link from /usr/lib/jvm/java-1.6.0-sun-1.6.0.15 to /usr/lib/jvm/java-6-sun to make it a little easier

Note: I had to use g++ instead of gcc to get a .so that RMIR could use.
_________________
-- Greg
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST)


Last edited by gfb107 on Mon Sep 14, 2009 9:34 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
WagonMaster



Joined: 16 Apr 2009
Posts: 361

                    
PostPosted: Mon Sep 14, 2009 8:18 pm    Post subject: Reply with quote

I can't offer anything better than Greg's sage advice.

Just for another data point, on my Slackware 12.1 installation, both of the those Java header files were in multiple locations (even prior to the installation of the Sun JDK), but the one that I think is being picked up automatically by the compiler is this:

/usr/lib/gcc/i486-slackware-linux/4.2.3/include

Both 'jni.h' and 'jni_md.h' are in that same directory, along with some other non-Java stuff.

I looked back in this thread and found no reference to the specific Linux distribution you were running. Since it may become relevant, please let us know which one you're using.

Bill
Back to top
View user's profile Send private message
wnewell



Joined: 13 Jan 2009
Posts: 158
Location: DFW, Texas

                    
PostPosted: Tue Sep 15, 2009 12:57 am    Post subject: Reply with quote

None of the above worked for me, however, copying the jni files to the source dir and using -I <source dir> in cl did. Here's the actual compile.

[wes@wes2 jp12]$ gcc -I /home/wes/jp12 -shared -fPIC -o libjp12serial.so jp12serial.cpp
[wes@wes2 jp12]$ ls
com_hifiremote_jp1_io_JP12Serial.h jni.h jp12serial.cpp jp1x-serial-library-source-code-0.14.zip
gpl.txt jni_md.h jp12serial.hpp libjp12serial.so*
[wes@wes2 jp12]$

BUT Smile, When I run rmir, there's no popups and everything looks normal, but there isn't any serial interface to select. Trying a download with autodetect results in No remotes found obviously. No errors on cl, but here's the end of rmaster.err. Back to you guys.Smile

Loading /home/wes/rm/Linux-amd64/libjp12serial.so
Unable to create JP12Serial object: /home/wes/rm/Linux-amd64/libjp12serial.so: /home/wes/rm/Linux-amd64/libjp12serial.so: undefined symbol: __gxx_personality_v0
Back to top
View user's profile Send private message
gfb107
Expert


Joined: 03 Aug 2003
Posts: 3411
Location: Cary, NC

                    
PostPosted: Tue Sep 15, 2009 6:08 am    Post subject: Reply with quote

That's the error that lead to me to use g++ instead of gcc

BTW there should not be a space between -I and the directory name
_________________
-- Greg
Original RemoteMaster developer
JP1 How-To's and Software Tools
The #1 Code Search FAQ and it's answer (PLEASE READ FIRST)
Back to top
View user's profile Send private message Visit poster's website
wnewell



Joined: 13 Jan 2009
Posts: 158
Location: DFW, Texas

                    
PostPosted: Tue Sep 15, 2009 9:58 am    Post subject: Reply with quote

Success. Should have tried g++ earlier. That did it. Space didn't seem to matter. Here's the compile line.

g++ -I /home/wes/jp12 -shared -fPIC -o libjp12serial.so jp12serial.cpp

I did a download and upload to my remote and it still worked so I'm assuming it's good to go. Should I upload it to the file section? Don't know why not, so here it is. Maybe some other 64bit uses can test it too.

http://www.hifi-remote.com/forums/dload.php?action=file&file_id=7246
Back to top
View user's profile Send private message
WagonMaster



Joined: 16 Apr 2009
Posts: 361

                    
PostPosted: Wed Sep 16, 2009 12:19 am    Post subject: Reply with quote

wnewell wrote:
Success. Should have tried g++ earlier. That did it.

Excellent! Glad to hear this. (I'll be sure to update the build instruction comment in the next release of the source code.) I appreciate your persistence in testing this.

wnewell wrote:
Should I upload it to the file section? Don't know why not, so here it is. Maybe some other 64bit uses can test it too.

And thanks for the upload. Even though I should be able to build my own once my Slackware 13.0 DVD arrives, I'll be sure to give your version a try first.

Bill
Back to top
View user's profile Send private message
mathdon
Expert


Joined: 22 Jul 2008
Posts: 4523
Location: Cambridge, UK

                    
PostPosted: Wed Sep 16, 2009 3:25 pm    Post subject: Reply with quote

WagonMaster wrote:
Since I carelessly neglected to include the JP1.x library's sole Java header file ('com_hifiremote_jp1_io_JP12Serial.h') in the zip file, your initial compile is choking on the result of those missing definitions. I don't know how I overlooked including that file in the release!

I was just about to send you a message about the absence of the Java header, but I see you've already corrected that.

WagonMaster wrote:
Please re-download the zip file, discarding your previous sources

I presume nothing else has changed?
________________
Graham
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> JP1 - Software All times are GMT - 5 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control