-
Notifications
You must be signed in to change notification settings - Fork 11
MacOSX install #8
Comments
I'll look into this when I have access to a Mac, possibly tomorrow. How did you install your version of the HPDF library? Direct from source, homebrew, or some other means? What version os OSX are you running? |
Thanks for the response, Kurt. I tried installing HPDF from source but had issues, so I ended up using homebrew. This was my best stab at modifying the Makefile:
|
Oh and I forgot to mention it's libharu version 2.3.0 |
Whew! These fussy build scripts make me realize why I like go so much. lua builds easily as do libpng and zlib, but the libharu build is one frustration after another. And I'm having trouble getting the antiquated homebrew installation on the Mac I borrowed to update properly. I'll chip away a bit more on this and will report back. |
I am unable to install homebrew on the Mac (version 10.7.5 from 2012) to which I have access, and I can't get past the configuration step when trying to build libharu from source.
This looks to me like the compiler is unable to find the libhpdf header files. You can use the |
Thanks for the response, Kurt! I'll try these suggestions out as soon as I get a chance and let you now how it goes. |
Hi Kurt, I ended up not having to use luahpdf on my mac, but I'm now very close to having it working on my web host. It's a freeBSD system, and with some messing around with the Makefile I was able to get luahpdf to make and install. Unfortunately, when I runt the test command I get this error
I think this may have something to do with luahpdf requiring haru to be a shared library, but I'm not sure. Thought I'd ask and see if you had any insight. Thanks! |
Hi @arnodick,
I'd still like to get it working on Macs, but I'll definitely need to get access to a newer one before I can proceed. libhpdf seems to build a lot more easily on Linux and BSD.
Yes, the ".so" indicates a shared object. After make completes, do you have a file called hpdf.so in the same directory as the Makefile? If so, what do you get when you run |
Yup, hpdf.so is in the directory after make and install. No errors, but I do get a warning:
The output of ldd ./hpdf.so is:
|
Good. Instead of
try
This will make sure that Lua looks for your hpdf.so in the current directory. If that works, then the problem with the first command is likely something to do with Lua finding the module where it was installed. |
Hi Kurt, I tried the modified command but it resulted in the same error. I did find this which seems to mention a very similar problem: #4 It mentions a pull request but I'm not which one they're referring to. #4 (comment) |
That pull request was already merged into the repository, so you're making use of it. Let's take a look at what the exports in the module you compiled. On Linux, the command is
If that doesn't work on FreeBSD, try
We're specifically looking for that |
Ah, I'm getting very different results.
The nm command for freeBSD seems to be the same as Debian. -g writes only global symbols. |
Do you get the same results with I just looked at the FreeBSD target in the Lua makefile as well as the makefiles in some other Lua modules on GitHub that build on FreeBSD. I have not found any flags that look out of place in luahpdf's makefile. I suggest starting as simply as possible and adding flags as needed, checking the generated object file (hpdf.o) each time with
Incrementally add the compiler flags |
Ah, I used a much simplified compile command The results were promising!
I don't have much time tonight to keep experimenting, but does this look more on track to you? Thanks! |
Definitely. I think you are one small step away. |
Hi Kurt,
This is a bit of a longshot, but is there any chance you have some advice for building luahpdf on MacOSX?
I'm getting this error:
hpdf.c:257:4 error: use of undeclared identifier 'HPDF_ARRAY_COUNT_ERR'
Plus a bunch more errors that follow the same pattern, saying there are undeclared identifiers.
I've tried changing the Makefile in a variety of ways, but nothing is working.
I've managed to get luahpdf installed on a linux machine, but for some reason can't get it working on OSX at all.
Thanks for your time
The text was updated successfully, but these errors were encountered: