Build Issue on OSX Lion #18

Closed
jschappet opened this Issue Jul 13, 2012 · 15 comments

Comments

Projects
None yet
4 participants
@jschappet
node-waf configure build
Checking for program g++ or c++          : clang 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for node path                   : not found 
Checking for node prefix                 : ok /usr/local 
Checking for libgphoto2                  : yes 
Checking for libgphoto2_port             : yes 
'configure' finished successfully (0.070s)
Waf: Entering directory `/Users/schappetj/CameraControl/node-gphoto2/build'
[1/9] cxx: src/preview.cc -> build/Release/src/preview_1.o
[2/9] cxx: src/autodetect.cc -> build/Release/src/autodetect_2.o
[3/9] cxx: src/binding.cc -> build/Release/src/binding_2.o
[4/9] cxx: src/camera.cc -> build/Release/src/camera_2.o
../src/preview.cc:28:3: error: no matching function for call to 'gp_context_set_error_func'
  gp_context_set_error_func (context, error_func, NULL);
  ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/gphoto2/gphoto2/gphoto2-context.h:89:6: note: candidate function not viable: no known conversion from 'void
      (GPContext *, const char *, __va_list_tag *, void *)' to 'GPContextErrorFunc' (aka 'void (*)(GPContext *, const char *, void *)') for 2nd argument
void gp_context_set_error_func     (GPContext *context,
     ^
../src/preview.cc:29:2: error: no matching function for call to 'gp_context_set_status_func'
        gp_context_set_status_func (context, error_func, NULL);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/gphoto2/gphoto2/gphoto2-context.h:91:6: note: candidate function not viable: no known conversion from 'void
      (GPContext *, const char *, __va_list_tag *, void *)' to 'GPContextStatusFunc' (aka 'void (*)(GPContext *, const char *, void *)') for 2nd argument
void gp_context_set_status_func    (GPContext *context,
     ^
2 errors generated.
Waf: Leaving directory `/Users/schappetj/CameraControl/node-gphoto2/build'
Build failed:  -> task failed (err #1): 
        {task: cxx preview.cc -> preview_1.o}
make: *** [all] Error 1
@lwille

This comment has been minimized.

Show comment Hide comment
@lwille

lwille Jul 13, 2012

Owner

which libgphoto2 version do you have?

Owner

lwille commented Jul 13, 2012

which libgphoto2 version do you have?

@jschappet

This comment has been minimized.

Show comment Hide comment
@jschappet

jschappet Jul 13, 2012

The latest from MacPorts, 1.0.9 I believe. checking now

The latest from MacPorts, 1.0.9 I believe. checking now

@lwille

This comment has been minimized.

Show comment Hide comment
@lwille

lwille Jul 13, 2012

Owner

Current is 2.5.0, my last build was with 2.4.13 (didn't have the time yet).

You can use homebrew to install libgphoto2-2.4.13 or install from source

Owner

lwille commented Jul 13, 2012

Current is 2.5.0, my last build was with 2.4.13 (didn't have the time yet).

You can use homebrew to install libgphoto2-2.4.13 or install from source

@jschappet

This comment has been minimized.

Show comment Hide comment
@jschappet

jschappet Jul 13, 2012

K, I removed libgphoto2 and reinstalled using homebrew.

Now I get:

tsunami:node-gphoto2 schappetj$ make
node-waf configure build
Checking for program g++ or c++          : clang 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for node path                   : not found 
Checking for node prefix                 : ok /usr/local 
Checking for libgphoto2                  : yes 
Checking for libgphoto2_port             : yes 
'configure' finished successfully (0.189s)
Waf: Entering directory `/Users/schappetj/Dropbox/CameraControl/node-gphoto2/build'
[8/9] cxx_link: build/Release/src/preview_1.o -> build/Release/preview
ld: warning: ignoring file Release/src/preview_1.o, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file /usr/local/Cellar/libgphoto2/2.4.14/lib/libgphoto2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file /usr/local/Cellar/libgphoto2/2.4.14/lib/libgphoto2_port.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file /usr/local/Cellar/libexif/0.6.20/lib/libexif.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
  "_main", referenced from:
      start in crt1.10.6.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Waf: Leaving directory `/Users/schappetj/Dropbox/CameraControl/node-gphoto2/build'
Build failed:  -> task failed (err #1): 
        {task: cxx_link preview_1.o -> preview}
make: *** [all] Error 1

K, I removed libgphoto2 and reinstalled using homebrew.

Now I get:

tsunami:node-gphoto2 schappetj$ make
node-waf configure build
Checking for program g++ or c++          : clang 
Checking for program cpp                 : /usr/bin/cpp 
Checking for program ar                  : /usr/bin/ar 
Checking for program ranlib              : /usr/bin/ranlib 
Checking for g++                         : ok  
Checking for node path                   : not found 
Checking for node prefix                 : ok /usr/local 
Checking for libgphoto2                  : yes 
Checking for libgphoto2_port             : yes 
'configure' finished successfully (0.189s)
Waf: Entering directory `/Users/schappetj/Dropbox/CameraControl/node-gphoto2/build'
[8/9] cxx_link: build/Release/src/preview_1.o -> build/Release/preview
ld: warning: ignoring file Release/src/preview_1.o, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file /usr/local/Cellar/libgphoto2/2.4.14/lib/libgphoto2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file /usr/local/Cellar/libgphoto2/2.4.14/lib/libgphoto2_port.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
ld: warning: ignoring file /usr/local/Cellar/libexif/0.6.20/lib/libexif.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols for architecture i386:
  "_main", referenced from:
      start in crt1.10.6.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Waf: Leaving directory `/Users/schappetj/Dropbox/CameraControl/node-gphoto2/build'
Build failed:  -> task failed (err #1): 
        {task: cxx_link preview_1.o -> preview}
make: *** [all] Error 1
@lwille

This comment has been minimized.

Show comment Hide comment
@lwille

lwille Jul 13, 2012

Owner

Did you make clean before?

Owner

lwille commented Jul 13, 2012

Did you make clean before?

@jschappet

This comment has been minimized.

Show comment Hide comment
@jschappet

jschappet Jul 14, 2012

Yes, sure did. I have now tried it on two machines, same result.

Yes, sure did. I have now tried it on two machines, same result.

@lwille

This comment has been minimized.

Show comment Hide comment
@lwille

lwille Aug 4, 2012

Owner

Hi @jschappet,

have you already solved the problem?
I have moved three days ago and many things have to be taken care of, so I didn't find the time to look into this issue yet.

Owner

lwille commented Aug 4, 2012

Hi @jschappet,

have you already solved the problem?
I have moved three days ago and many things have to be taken care of, so I didn't find the time to look into this issue yet.

@jschappet

This comment has been minimized.

Show comment Hide comment
@jschappet

jschappet Aug 24, 2012

Sorry, I ended up using motion and a $15 web cam

http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome

Sorry, I ended up using motion and a $15 web cam

http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome

@lwille

This comment has been minimized.

Show comment Hide comment
@lwille

lwille Aug 24, 2012

Owner

Looks like you did the right thing - gphoto is neither capable of doing motion detection nor controlling webcams.

Good luck!

Leonhardt Wille
Gesendet mit Sparrow (http://www.sparrowmailapp.com/?sig)

Am Freitag, 24. August 2012 um 18:30 schrieb James Schappet:

Sorry, I ended up using motion and a $15 web cam
http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome


Reply to this email directly or view it on GitHub (#18 (comment)).

Owner

lwille commented Aug 24, 2012

Looks like you did the right thing - gphoto is neither capable of doing motion detection nor controlling webcams.

Good luck!

Leonhardt Wille
Gesendet mit Sparrow (http://www.sparrowmailapp.com/?sig)

Am Freitag, 24. August 2012 um 18:30 schrieb James Schappet:

Sorry, I ended up using motion and a $15 web cam
http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome


Reply to this email directly or view it on GitHub (#18 (comment)).

@jschappet

This comment has been minimized.

Show comment Hide comment
@jschappet

jschappet Aug 24, 2012

I may come back to this for some other projects. Please keep up the good work

I may come back to this for some other projects. Please keep up the good work

@solydzajs

This comment has been minimized.

Show comment Hide comment
@solydzajs

solydzajs Sep 4, 2012

I had the same issue. It's related to node-waf and x86_64. node-waf is trying to create i386 binary, but gphoto2 libs that are installed are x86_64. node-waf is not deprecated and node-gyp should be used for module building. I have a bindings.gyp already done. Let me know if you plan to migrate to node-gyp

I had the same issue. It's related to node-waf and x86_64. node-waf is trying to create i386 binary, but gphoto2 libs that are installed are x86_64. node-waf is not deprecated and node-gyp should be used for module building. I have a bindings.gyp already done. Let me know if you plan to migrate to node-gyp

@superunrelated

This comment has been minimized.

Show comment Hide comment
@superunrelated

superunrelated Nov 15, 2012

I have the same issue. After having a go at creating a bindings.gyp file I have realized that this is just out of my reach just yet. Can someone please share one that works?

I have the same issue. After having a go at creating a bindings.gyp file I have realized that this is just out of my reach just yet. Can someone please share one that works?

@lwille

This comment has been minimized.

Show comment Hide comment
@lwille

lwille Nov 15, 2012

Owner

Thanks for your patience guys, I'm very busy with other projects at the moment.
Also thanks to @solydzajs for the node-gyp hint!

I just pushed a new version using node-gyp, tested in the following environment:

  • OS X Mountain Lion 10.8.2
  • gcc version 4.2.1
  • -arch x86_64
  • node 0.8.14

You can install it via npm, it's bound to node -v 0.8.x
I'd be happy if you could confirm a working build, so I can close this issue :)
(of course, any build errors are also appreciated).

Feel free to run npm test with an attached camera (I can only test with the 550D (Rebel T2i) and 5D Mark II).

@solydzajs, if your .gyp file is more elaborate, please share it with a pull request.

Owner

lwille commented Nov 15, 2012

Thanks for your patience guys, I'm very busy with other projects at the moment.
Also thanks to @solydzajs for the node-gyp hint!

I just pushed a new version using node-gyp, tested in the following environment:

  • OS X Mountain Lion 10.8.2
  • gcc version 4.2.1
  • -arch x86_64
  • node 0.8.14

You can install it via npm, it's bound to node -v 0.8.x
I'd be happy if you could confirm a working build, so I can close this issue :)
(of course, any build errors are also appreciated).

Feel free to run npm test with an attached camera (I can only test with the 550D (Rebel T2i) and 5D Mark II).

@solydzajs, if your .gyp file is more elaborate, please share it with a pull request.

@superunrelated

This comment has been minimized.

Show comment Hide comment
@superunrelated

superunrelated Nov 19, 2012

Awesome! Thank you for fixing this.

This now works with my setup:

  • OSX Lion 10.7.5
  • gcc version 4.2
  • -arch i386
  • node 0.8.6

I ran the tests with a 500D and it mostly worked after upping the timeouts. I think this camera is quite slow since it's slow when I use the command line interface as well.

The tests failed on:

  • node-gphoto2 should allow saving camera settings
  • node-gphoto2 should return a proper error code when something goes wrong
  • node-gphoto2 should be able to take a preview picture and send it over a socket

I assume there are some features this camera don't support. I'll continue testing with some other cameras and try and figure out what is failing.

Thanks a lot!

Awesome! Thank you for fixing this.

This now works with my setup:

  • OSX Lion 10.7.5
  • gcc version 4.2
  • -arch i386
  • node 0.8.6

I ran the tests with a 500D and it mostly worked after upping the timeouts. I think this camera is quite slow since it's slow when I use the command line interface as well.

The tests failed on:

  • node-gphoto2 should allow saving camera settings
  • node-gphoto2 should return a proper error code when something goes wrong
  • node-gphoto2 should be able to take a preview picture and send it over a socket

I assume there are some features this camera don't support. I'll continue testing with some other cameras and try and figure out what is failing.

Thanks a lot!

@lwille

This comment has been minimized.

Show comment Hide comment
@lwille

lwille Nov 21, 2012

Owner

When I built the test, I had a 550D that supports all the settings that are written there, so I should use more generic settings to test it :)

Also, it would be nice if you could add a logging line to "should return a proper error code" to see what the error looks like (I expected it to be a number).

Also, the sending of previews over a socket should fail if your camera doesn't have an EOS Viewfinder ("Live mode").

Owner

lwille commented Nov 21, 2012

When I built the test, I had a 550D that supports all the settings that are written there, so I should use more generic settings to test it :)

Also, it would be nice if you could add a logging line to "should return a proper error code" to see what the error looks like (I expected it to be a number).

Also, the sending of previews over a socket should fail if your camera doesn't have an EOS Viewfinder ("Live mode").

@lwille lwille closed this Dec 10, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment