newbie help wanted with installing/using netpbm through macports

Matt mattness at mac.com
Mon Jan 14 15:35:20 PST 2008


Hi Ryan,

Thanks for the help.

I did find the following in the makefile for ppmtomd:

# if your ppm libraries are not in a standard place, uncomment
# and change this. You may also need thing like -R, but if you're
# on that sort of system you probably know it!
# LDLIBS = -L/usr/local/lib

I uncommented and changed the line to:

LDLIBS = -L/opt/local/lib

I also added your:

export CFLAGS="-I/opt/local/include"
export LDFLAGS="-L/opt/local/lib"

to my ~/.profile

Unfortunately, it still can't find those two header files on compiling.

Do I need to add something more to the makefile that points to -I/opt/ 
local/include?

Thanks!

-Matt



On Jan 14, 2008, at 5:26 PM, Ryan Schmidt wrote:

> On Jan 14, 2008, at 14:54, Matt wrote:
>
>> I am trying to compile an intel mac compatible version of an open  
>> source
>> printer driver so I can use my old but beloved Alps printer on my  
>> new intel
>> imac.  The source for the driver is here:
>>
>> http://openprinting.org/show_driver.cgi?driver=ppmtomd&fromprinter=Alps-MD-1000
>>
>> I downloaded the source for the driver and tried to perform a make  
>> on it in
>> the terminal.  The string of errors showed me that it was missing  
>> the pgm.h
>> and ppm.h header files.  Searching for these files online I found  
>> that they
>> belong to the netpbm library.  It seemed like the easiest way to  
>> install
>> netpbm and any dependant libraries was through macports.
>>
>> I succesfully downloaded, installed, and updated macports, then  
>> told it to
>> install netpbm.  I got no errors and everything looked good.   
>> Unfortunately,
>> the source for the ppmtomd driver still can't find those header files
>> (though I can through spotlight).
>
> You probably haven't told the ppmtomd build system that you've  
> installed netpbm in /opt/local and it probably won't think to look  
> there on its own.
>
>
>> When I check to see what ports I have installed I get the following  
>> output:
>>
>> iMatt:~ mwoods$ port installed
>> The following ports are currently installed:
>> jasper @1.701.0_0 (active)
>> jpeg @6b_2 (active)
>> libpng @1.2.24_0 (active)
>> netpbm @10.26.48_0 (active)
>> tiff @3.8.2_1+macosx (active)
>> zlib @1.2.3_1 (active)
>> iMatt:~ mwoods$
>>
>> if they were installed properly though, I would think I could use the
>> "which" command on them.
>
> If they all provided a binary by the same name as the port, then  
> yes. But not all ports provide binaries of the same name. Not all  
> ports even provide binaries. (Some just provide libraries.)
>
>> Unfortunately, the only port that responds to
>> "which" is jasper which I assume is a dependent library that was  
>> installed
>> with netpbm.
>>
>> iMatt:~ mwoods$ which netpbm
>> iMatt:~ mwoods$ which jasper
>> /opt/local/bin/jasper
>
> Yes. As you can see with "port deps netpbm", netpbm declares a  
> library dependency on jasper.
>
>> I suspect either netpbm is not installed properly, or I have to do  
>> something
>> to the makefile of the printer driver to get it to find those  
>> libraries, but
>> I haven't been able to figure it out.
>
> netpbm is likely installed just fine. "port contents netpbm" will  
> show you everything it installed. It looks like it installs many  
> binaries but none called "netpbm". It does install a libnetpbm, but  
> "which" does not search for libraries, only binaries.
>
>
> Bottom line: when you configure and compile ppmtomd, you just need  
> to tell it where netpbm is. This could help:
>
> export CFLAGS="-I/opt/local/include"
> export LDFLAGS="-L/opt/local/lib"
>
> And then follow the instructions for how to compile ppmtomd.
>
>



More information about the macports-users mailing list