6

I am trying since a couple of months to be able to generate images of PCB gerbers using an online service, and thinking of spinning up my own.

My choice is heroku ( open to changing), and the choice of the gerber parser/viewer is gerbv(again, open to changing)

I have read about buildpacks and vagrant and perhaps all options on getting gerbv to be able to run on heroku. The part where I am stuck right now is that gerbv requires gtk and heroku doesnt have it ( doesnt need it).

How do you compile gerbv without the gtk part?

Edit: I downloaded the source of gerbv to heroku using wget, then untar'ed it, and went into src folder, issued the following command

gcc -Wall -fPIC -c *.c

which allows me to create .o files for all the C code gerbv offers. Unfortunately, it requires gtk to compile, which heroku cant have. So it is entirely possible that the library part cannot be seperated from the interface part and be able to run libgerbv standalone.

Rupin
  • 610
  • 7
  • 23

1 Answers1

3

Looking at http://gerbv.geda-project.org/ it says

The core functionality of gerbv is located in a separate library (libgerbv)

Maybe instead of using gerbv (the graphical interface) you should use libgerbv directly? See http://gerbv.geda-project.org/doxygen/index.html for more info.

I also found an example (https://github.com/bleepbloop/absolum/blob/master/gerbv/viewer.py) using ctypes to interact with the library.

Hugh Bothwell
  • 55,315
  • 8
  • 84
  • 99
  • I did actually find the first link you have added, but it lacks info of how to go about compiling libgerbv. I am mostly a noob when it comes to this, please excuse my ignorance. – Rupin Jan 15 '16 at 18:13
  • Read today morning about how to create the dynamic linked library and looks like its an easy task. Will log my process for anyone else who ends up on this thread. – Rupin Jan 16 '16 at 04:35
  • I downloaded the source of gerbv to heroku using wget, then untar'ed it, and went into src folder, issued the following command gcc -Wall -fPIC -c *.c which allows me to create .o files for all the C code gerbv offers. Unfortunately, it requires gtk to compile, which heroku cant have. So it is entirely possible that the library part cannot be seperated from the interface part and be able to run libgerbv standalone. – Rupin Jan 16 '16 at 07:11