jim-easterbrook / python-gphoto2

Python interface to libgphoto2
GNU Lesser General Public License v3.0
362 stars 59 forks source link

Install errors Mac osx #16

Closed amirom closed 8 years ago

amirom commented 8 years ago

I am having issues trying to pip install, I have installed SWIG, but still can't get past this issue, thanks for your help

-strict-prototypes -Werror -DGPHOTO2_25 src/swig-bi-gp2.5-py2/file_wrap.c:4732:80: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32] resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_unsigned_SS_int((_arg4)));


  src/swig-bi-gp2.5-py2/file_wrap.c:5407:80: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Werror,-Wshorten-64-to-32]
      resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_unsigned_SS_int((_arg4)));
                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~  ^~~~~
  2 errors generated.
  error: command 'cc' failed with exit status 1

---

  Failed building wheel for gphoto2
  Running setup.py clean for gphoto2
Failed to build gphoto2
jim-easterbrook commented 8 years ago

Installing with pip shouldn't use SWIG, so it doesn't matter if it's installed or not. This is clearly a bug but I'm surprised I haven't encountered it on the computers I've been using. Maybe something to do with the default size of int on different systems. I haven't had a Mac since the days of MacOS 8.

jim-easterbrook commented 8 years ago

Commit f174207 (released as v1.4.1) should fix this.

amirom commented 8 years ago

Hi Jim, Thank you so much for pushing that fix, unfortunately that didn't solve the issue. Since linux seems to be the key here, I decided to pull the trigger and dev on ubuntu. Again, appreciate your efforts, but it built magically well on this linux distro!

jim-easterbrook commented 8 years ago

It's odd that v1.4.1 didn't fix the problem, as it entirely removes the function that was upsetting the compiler. I would like python-gphoto2 to work on MacOS.

christopherfowers commented 6 years ago

I'm sorry to revive a long untouched and closed issue but has there been any progress on this?

jim-easterbrook commented 6 years ago

I don't have MacOS so am not able to investigate the problem myself. What errors are you getting when trying to install the current version?