We help IT Professionals succeed at work.

popt compiling error

chuckycharms
chuckycharms asked
on
379 Views
Last Modified: 2013-11-22
Any help would be awesome.

I am very new with freeBSD, so detailed help is the best. I am trying to compile a program call pport, which allows for manipulation of the serial port. When compiling I get the following error:

checking for pooptgetcontext in -lpopt... no
The popt library used for parsing command line options is required in order for this program to operate correctly. Please check out1 and download2 from the following sites:

1http://freshmeat.net/projects/popt/
2 ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/

I have ensured that popt is installed. I dont really know where to go from here.

Adam
Comment
Watch Question

Software Developer
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Hey! Thanks for the reply. Looks like you are right, thoutput of the find command results in:

/usr/local/lib/libpopt.so.0
/usr/local/lib/libpopt.so
/usr/local/lib/libpopt.la
/usr/local/lib/libpopt.a

it looks like the command I need to run when configuring is ./configure -L/usr/local/lib

is that correct? I will give it a try and repost.

Author

Commented:
nope, that command is incorrect, I am searching on how to use LDFLAGS, but if you could give me a hint in the meant time, that would be great.

Author

Commented:
Ok figured it out, it was ./configure LDFLAGS=-L/usr/local/lib

It completed successfully, however after running make i get a bunch of ppport.c warnings, and then errors like:

pport.c:66: error: arrary size missing in 'optionT'
pport.c:102: error: 'optCon' undeclared (first use in this function)
pport.c:153: error: 'POPT_BADOPTION_NOALIAS' undeclared (first use in this function)

Stop in /downloads/pport-0.6.9/src.
*** Error code 1

Stop in /downloads/pport-0.6.9.
*** Error code 1

Stop in /downloads/pport-0.6.9.
*** Error code 1

Im loosin it here.....HA! Please help...
Duncan RoeSoftware Developer
CERTIFIED EXPERT

Commented:
popt header files will have gone to /usr/local/include. Move them to /usr/include. In future consider using ./configure --prefix=/usr when building packages that you don't have currently installed - it can do no harm
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.