olegkutkov / open-phd-guiding

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

Build/Link Issue #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. cmake .
2. make

What is the expected output? What do you see instead?
NULL not defined in indi_list.cpp. Patched that, but then a whole host of 
linker errors:

Linking CXX executable PHD
CMakeFiles/PHD.dir/cam_INDI.cpp.o: In function 
`Camera_INDIClass::ReadFITS(usImage&)':
cam_INDI.cpp:(.text+0x81b): undefined reference to `ffomem'
cam_INDI.cpp:(.text+0x8c0): undefined reference to `ffghdt'
cam_INDI.cpp:(.text+0x971): undefined reference to `ffgidm'
cam_INDI.cpp:(.text+0x993): undefined reference to `ffgisz'
cam_INDI.cpp:(.text+0x9c7): undefined reference to `ffthdu'
cam_INDI.cpp:(.text+0xb18): undefined reference to `ffgpxv'
cam_INDI.cpp:(.text+0xba1): undefined reference to `ffclos'
CMakeFiles/PHD.dir/cam_simulator.cpp.o: In function 
`Camera_SimClass::CaptureFull(int, usImage&, bool)':
cam_simulator.cpp:(.text+0x14a): undefined reference to `ffdkopn'
cam_simulator.cpp:(.text+0x177): undefined reference to `ffghdt'
cam_simulator.cpp:(.text+0x228): undefined reference to `ffgidm'
cam_simulator.cpp:(.text+0x24a): undefined reference to `ffgisz'
cam_simulator.cpp:(.text+0x27e): undefined reference to `ffthdu'
cam_simulator.cpp:(.text+0x3cf): undefined reference to `ffgpxv'
cam_simulator.cpp:(.text+0x458): undefined reference to `ffclos'
CMakeFiles/PHD.dir/frame_events.cpp.o: In function 
`MyFrame::OnSave(wxCommandEvent&)':
frame_events.cpp:(.text+0x59a): undefined reference to `ffinit'
frame_events.cpp:(.text+0x5d2): undefined reference to `ffcrim'
frame_events.cpp:(.text+0x60b): undefined reference to `ffppx'
frame_events.cpp:(.text+0x61e): undefined reference to `ffclos'
collect2: ld returned 1 exit status
make[2]: *** [PHD] Error 1
make[1]: *** [CMakeFiles/PHD.dir/all] Error 2
make: *** [all] Error 2

What version of the product are you using? On what operating system?
Latest checkout on Arch Linux x86_64

Please provide any additional information below.
N/A

Original issue reported on code.google.com by conor.mc...@gmail.com on 4 Jul 2011 at 8:13

GoogleCodeExporter commented 9 years ago
you don't have libcfits properly installed, or you have an unsupported version. 
 Cmake should have complained if the librires weren't installed.

Original comment by geoffr...@gmail.com on 5 Jul 2011 at 2:14

GoogleCodeExporter commented 9 years ago
Strange. I compiled the library from source and installed, ran ldconfig and
confirmed that its in my path. Cmake didn't complain. Is OpenPHD compatible
with the latest release of the library?

I'll try again later to confirm. Its quite possible I've overlooked
something.

Original comment by conor.mc...@gmail.com on 5 Jul 2011 at 7:40

GoogleCodeExporter commented 9 years ago
Try running:
make VERBOSE=1
it should show you the link cmdline, and maybe that will help identify why 
libcfits isn't being found.  Did you get any compile warnings on those 
functions?  CMake should have failed to build the Makefile if it couldn't find 
the headers or the libs.

Original comment by geoffr...@gmail.com on 5 Jul 2011 at 1:35

GoogleCodeExporter commented 9 years ago
No compile warnings reported on these functions at all. It definitely looks 
like a linker issue. Verbose logs don't indicate anything of note in the 
command:

Linking CXX executable PHD
/usr/bin/cmake -E cmake_link_script CMakeFiles/PHD.dir/link.txt --verbose=1
/usr/bin/c++   -DOPENPHD -pthread -W -Wall -Wextra -DSIMULATOR -DINDI_CAMERA 
-DV4L_CAMERA -DGUIDE_INDI   CMakeFiles/PHD.dir/camera.cpp.o 
CMakeFiles/PHD.dir/cam_INDI.cpp.o CMakeFiles/PHD.dir/cam_SBIG.cpp.o 
CMakeFiles/PHD.dir/cam_simulator.cpp.o CMakeFiles/PHD.dir/canvas.cpp.o 
CMakeFiles/PHD.dir/config_INDI.cpp.o CMakeFiles/PHD.dir/eegg.cpp.o 
CMakeFiles/PHD.dir/frame_events.cpp.o CMakeFiles/PHD.dir/graph.cpp.o 
CMakeFiles/PHD.dir/guide_routines.cpp.o CMakeFiles/PHD.dir/image_math.cpp.o 
CMakeFiles/PHD.dir/phd.cpp.o CMakeFiles/PHD.dir/prefs.cpp.o 
CMakeFiles/PHD.dir/scope.cpp.o CMakeFiles/PHD.dir/socket_server.cpp.o 
CMakeFiles/PHD.dir/tele_INDI.cpp.o CMakeFiles/PHD.dir/usImage.cpp.o 
CMakeFiles/PHD.dir/GC_USBST4.cpp.o CMakeFiles/PHD.dir/libindiclient/indi.c.o 
CMakeFiles/PHD.dir/libindiclient/wx/indigui.cpp.o 
CMakeFiles/PHD.dir/libindiclient/wx/indi_io.cpp.o 
CMakeFiles/PHD.dir/libindiclient/wx/indi_list.cpp.o 
CMakeFiles/PHD.dir/libindiclient/wx/indi_config.cpp.o 
CMakeFiles/PHD.dir/libindiclient/wx/indisave.cpp.o 
CMakeFiles/PHD.dir/libindiclient/wx/wxled.cpp.o 
CMakeFiles/PHD.dir/libindiclient/wx/wxchecktreectrl.cpp.o 
CMakeFiles/PHD.dir/libindiclient/base64.c.o 
CMakeFiles/PHD.dir/libindiclient/lilxml.c.o 
CMakeFiles/PHD.dir/cam_VIDEODEVICE.cpp.o 
CMakeFiles/PHD.dir/config_VIDEODEVICE.cpp.o CMakeFiles/PHD.dir/v4lcontrol.cpp.o 
CMakeFiles/PHD.dir/cameras/linuxvideodevice.cpp.o  -o PHD -rdynamic -lcfitsio 
-pthread -Wl,--hash-style=gnu -Wl,--as-needed -lwx_baseu-2.8 
-lwx_gtk2u_core-2.8 -lwx_baseu_net-2.8 -lwx_gtk2u_html-2.8 -ludev -lrt -lv4l2 
-lv4lconvert -lz 
CMakeFiles/PHD.dir/cam_INDI.cpp.o: In function 
`Camera_INDIClass::ReadFITS(usImage&)':
cam_INDI.cpp:(.text+0x81b): undefined reference to `ffomem'
cam_INDI.cpp:(.text+0x8c0): undefined reference to `ffghdt'
cam_INDI.cpp:(.text+0x971): undefined reference to `ffgidm'
cam_INDI.cpp:(.text+0x993): undefined reference to `ffgisz'
cam_INDI.cpp:(.text+0x9c7): undefined reference to `ffthdu'
cam_INDI.cpp:(.text+0xb18): undefined reference to `ffgpxv'
cam_INDI.cpp:(.text+0xba1): undefined reference to `ffclos'
CMakeFiles/PHD.dir/cam_simulator.cpp.o: In function 
`Camera_SimClass::CaptureFull(int, usImage&, bool)':
cam_simulator.cpp:(.text+0x14a): undefined reference to `ffdkopn'
cam_simulator.cpp:(.text+0x177): undefined reference to `ffghdt'
cam_simulator.cpp:(.text+0x228): undefined reference to `ffgidm'
cam_simulator.cpp:(.text+0x24a): undefined reference to `ffgisz'
cam_simulator.cpp:(.text+0x27e): undefined reference to `ffthdu'
cam_simulator.cpp:(.text+0x3cf): undefined reference to `ffgpxv'
cam_simulator.cpp:(.text+0x458): undefined reference to `ffclos'
CMakeFiles/PHD.dir/frame_events.cpp.o: In function 
`MyFrame::OnSave(wxCommandEvent&)':
frame_events.cpp:(.text+0x59a): undefined reference to `ffinit'
frame_events.cpp:(.text+0x5d2): undefined reference to `ffcrim'
frame_events.cpp:(.text+0x60b): undefined reference to `ffppx'
frame_events.cpp:(.text+0x61e): undefined reference to `ffclos'
collect2: ld returned 1 exit status

And CMake did indeed generate the MakeFile, obviously, so it seems to be 
finding libcfits alright. Any ideas?

Original comment by conor.mc...@gmail.com on 5 Jul 2011 at 8:46

GoogleCodeExporter commented 9 years ago
Should have also noted that I've got libcfitsio == 3.280

Original comment by conor.mc...@gmail.com on 5 Jul 2011 at 8:51

GoogleCodeExporter commented 9 years ago
Try an nm on your libcfits.so and grep for those functions to see if they are 
exported.
I'm running libcfits 3.230 which is quite a bit older, but I would have 
expected compile warnings had the functions not been included in the current 
cfits package.
I can try to compile the latest cfits library and see if I see an issue, if the 
nm doesn't reveal anything interesting.

Original comment by geoffr...@gmail.com on 6 Jul 2011 at 4:41

GoogleCodeExporter commented 9 years ago
No symbols found in libcfitsio.so but they are in libcfitsio.a

Looks like a corrupt library. Recompiled and now it's solved. I appreciate your 
help in solving this one. It was driving me a little crazy.

Excellent port - First time I've used it and I'm most impressed. Would love to 
get involved.

Original comment by conor.mc...@gmail.com on 6 Jul 2011 at 6:02

GoogleCodeExporter commented 9 years ago
Glad it worked.  We're always receptive to patches, but be aware that we rely 
on code drops from Craig, so we need to keep it easy for him to merge his 
changes.

Original comment by geoffr...@gmail.com on 6 Jul 2011 at 7:11