olegkutkov / open-phd-guiding

Automatically exported from code.google.com/p/open-phd-guiding
0 stars 0 forks source link

Can not compile phd2 on raspbian (debian raspberry pi) #346

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have folled linux compilation guide step by step.
2. I have complied by myself wxwidgets without any errors and is installed 
correctly.
3. When compiling PHD2, it gets 100%,but fail trying to link phd2 executable ..

[ 99%] Building C object CMakeFiles/phd2.dir/libindiclient/base64.c.o
[100%] Building C object CMakeFiles/phd2.dir/libindiclient/lilxml.c.o
Linking CXX executable phd2
/usr/bin/ld: 
/media/usbdisk/open-phd-guiding/cameras/zwolibs/x86/libASICamera2.a(ASICamera2.o
): Relocations in generic ELF (EM: 3)
/usr/bin/ld: 
/media/usbdisk/open-phd-guiding/cameras/zwolibs/x86/libASICamera2.a(ASICamera2.o
): Relocations in generic ELF (EM: 3)
/usr/bin/ld: 
/media/usbdisk/open-phd-guiding/cameras/zwolibs/x86/libASICamera2.a(ASICamera2.o
): Relocations in generic ELF (EM: 3)
/media/usbdisk/open-phd-guiding/cameras/zwolibs/x86/libASICamera2.a: error 
adding symbols: File in wrong format
collect2: ld returned 1 exit status
CMakeFiles/phd2.dir/build.make:2987: recipe for target 'phd2' failed
make[2]: *** [phd2] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/phd2.dir/all' failed
make[1]: *** [CMakeFiles/phd2.dir/all] Error 2
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2

What is the expected output? What do you see instead?

Linking correctly phd2 executable..

What version of the product are you using? On what operating system?
raspbian (wheezy) on raspberry pi

Please provide any additional information below.

Original issue reported on code.google.com by frjar...@gmail.com on 19 Oct 2014 at 8:37

GoogleCodeExporter commented 9 years ago
Hi frjaraur,

Glad that you're working on a RPI port ! The vendor provided ZWO library 
x86/libASICamera2.a is not for the ARM CPU. We can ask ZWO for a RPI build but 
until then you're best off disabling ZWO support on the RPI.

Good luck and do pop by to say hi in the developer and user chat 
irc://irc.freenode.net/#phd :)

-- Hans

Original comment by h...@dse.nl on 19 Oct 2014 at 8:47

GoogleCodeExporter commented 9 years ago
Many Thanks, I am going to disable it, try again and let you know.
Javier R.

Original comment by frjar...@gmail.com on 19 Oct 2014 at 8:49

GoogleCodeExporter commented 9 years ago
Is there any way to be sure that is everything related to ZWO Cams disabled??, 
I tried commenting all related lines in CMakeLists.txt but it fails again after 
3 hours compiling...

Linking CXX executable phd2
CMakeFiles/phd2.dir/cam_ZWO.cpp.o: In function `Camera_ZWO::Connect()':
cam_ZWO.cpp:(.text+0x2ac): undefined reference to `ASIGetNumOfConnectedCameras'
cam_ZWO.cpp:(.text+0x390): undefined reference to `ASIGetCameraProperty'
cam_ZWO.cpp:(.text+0x558): undefined reference to `ASIGetCameraProperty'
cam_ZWO.cpp:(.text+0x658): undefined reference to `ASIOpenCamera'
cam_ZWO.cpp:(.text+0x80c): undefined reference to `ASIGetNumOfControls'
cam_ZWO.cpp:(.text+0x94c): undefined reference to `ASIGetControlCaps'
cam_ZWO.cpp:(.text+0x9fc): undefined reference to `ASISetControlValue'
cam_ZWO.cpp:(.text+0xaec): undefined reference to `ASISetStartPos'
cam_ZWO.cpp:(.text+0xb38): undefined reference to `ASISetROIFormat'
CMakeFiles/phd2.dir/cam_ZWO.cpp.o: In function `Camera_ZWO::StopCapture()':
cam_ZWO.cpp:(.text+0xd54): undefined reference to `ASIStopVideoCapture'
CMakeFiles/phd2.dir/cam_ZWO.cpp.o: In function `Camera_ZWO::Disconnect()':
cam_ZWO.cpp:(.text+0xda0): undefined reference to `ASICloseCamera'
CMakeFiles/phd2.dir/cam_ZWO.cpp.o: In function `flush_buffered_image(int, 
usImage&)':
cam_ZWO.cpp:(.text+0xe98): undefined reference to `ASIGetVideoData'
CMakeFiles/phd2.dir/cam_ZWO.cpp.o: In function `Camera_ZWO::Capture(int, 
usImage&, wxRect, bool)':
cam_ZWO.cpp:(.text+0x118c): undefined reference to `ASIGetControlValue'
cam_ZWO.cpp:(.text+0x1204): undefined reference to `ASISetControlValue'
cam_ZWO.cpp:(.text+0x124c): undefined reference to `ASIGetControlValue'
cam_ZWO.cpp:(.text+0x12d0): undefined reference to `ASISetControlValue'
cam_ZWO.cpp:(.text+0x1430): undefined reference to `ASISetROIFormat'
cam_ZWO.cpp:(.text+0x14d8): undefined reference to `ASISetStartPos'
cam_ZWO.cpp:(.text+0x1598): undefined reference to `ASIStartVideoCapture'
cam_ZWO.cpp:(.text+0x1680): undefined reference to `ASIGetVideoData'
CMakeFiles/phd2.dir/cam_ZWO.cpp.o: In function 
`Camera_ZWO::ST4PulseGuideScope(int, int)':
cam_ZWO.cpp:(.text+0x1a64): undefined reference to `ASIPulseGuideOn'
cam_ZWO.cpp:(.text+0x1a84): undefined reference to `ASIPulseGuideOff'
CMakeFiles/phd2.dir/cam_ZWO.cpp.o: In function `Camera_ZWO::ClearGuidePort()':
cam_ZWO.cpp:(.text+0x1ab8): undefined reference to `ASIPulseGuideOff'
cam_ZWO.cpp:(.text+0x1acc): undefined reference to `ASIPulseGuideOff'
cam_ZWO.cpp:(.text+0x1ae0): undefined reference to `ASIPulseGuideOff'
cam_ZWO.cpp:(.text+0x1af4): undefined reference to `ASIPulseGuideOff'
collect2: ld returned 1 exit status
CMakeFiles/phd2.dir/build.make:3011: recipe for target 'phd2' failed
make[2]: *** [phd2] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/phd2.dir/all' failed
make[1]: *** [CMakeFiles/phd2.dir/all] Error 2
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2

Many Thanks In Advance,
Javier R.

Original comment by frjar...@gmail.com on 19 Oct 2014 at 2:53

GoogleCodeExporter commented 9 years ago
I'll try to reproduce your problem to see if I can help, hold on a bit.

Original comment by h...@dse.nl on 19 Oct 2014 at 6:22

GoogleCodeExporter commented 9 years ago
1) vim CMakeLists.txt
# zwo libraries
#if (UNIX AND NOT APPLE)
#  find_package(ZWO REQUIRED)
#endif()

2)
./cam_ZWO.cpp is protected by "#ifdef ZWO_ASI"
disable ZWO_ASI in cameras.h in the __LINUX__ section :
/*# define ZWO_ASI*/

That's it. Tested.

-- Hans

Original comment by h...@dse.nl on 19 Oct 2014 at 7:50

GoogleCodeExporter commented 9 years ago
Many thanks, now trying to compile again (it takes a couple of hours from
clean).

Original comment by frjar...@gmail.com on 19 Oct 2014 at 7:54

GoogleCodeExporter commented 9 years ago
Did it work ? (and can we close this ticket ?)

Original comment by h...@dse.nl on 21 Oct 2014 at 9:07

GoogleCodeExporter commented 9 years ago
Works!!, many thanks!!!

Javier R.

Original comment by frjar...@gmail.com on 21 Oct 2014 at 4:14

GoogleCodeExporter commented 9 years ago
cool ! closing this ticket.

Original comment by h...@dse.nl on 21 Oct 2014 at 8:28