DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 2nd December 2008
kasse kasse is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 67
Default Is /usr/X11R6/include/ supposed to be in $CPATH

When I try to build certain non-openbsd packages I manually have to set CPATH to include /usr/X11R6/include for the makefiles to work.

Since the makefiles are made for generic os'es I assume that there is something wrong in my configuration.

I once had similar troubles with building ports in netbsd, I had the X-headers but when I made the ports, it did not find the X-headers. The error then, was that I had not installed with the option X11 distfiles.
Have I missed something similar in openbsd? How can I set this after the install.
Reply With Quote
  #2   (View Single Post)  
Old 2nd December 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I have ported a few applications to OpenBSD, but never an X-based one.

But ....

If you look at any Makefile for an existing port that uses X -- along with a bunch of X libraries in WANTLIB, you should see USE_X11=Yes. According to bsd.port.mk(5), this is required to build ports that require X facilities.

Some analysis, such as:
$ find /usr/ports/infrastructure -type f -exec grep -i x11 {} /dev/null \; | less
may help you uncover information about how X applications are ported. You should note tools like build/resolve-lib and db/config.x11.site that set library and include paths for X, respectively. Based on my cursory review of this -- perhaps 30 seconds worth of find commands, CPATH is not set within the ports infrastructure.

You may want to start with an existing port with similar infrastructure requirements, and build your own based on its Makefile structure.

See www.openbsd.org/porting.html for the start of many web pages on porting applications.

Last edited by jggimi; 3rd December 2008 at 01:51 AM. Reason: typo
Reply With Quote
  #3   (View Single Post)  
Old 3rd December 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

To answer the question.. none of the base package sets depend on each other.. the version of gcc in the comp44.tgz package is the "system compiler", i.e: for the kernel and base userland.

So.. by default, the only path it looks in is /usr.. which is guaranteed to always be there.

I hope that helps.. just manually point to the paths using the -I and -L arguments.
Reply With Quote
  #4   (View Single Post)  
Old 3rd December 2008
kasse kasse is offline
Fdisk Soldier
 
Join Date: Jun 2008
Posts: 67
Default

To begin with, I would like to express my appreciation for you taking the time to help out.

Quote:
Originally Posted by jggimi View Post
You should note tools like build/resolve-lib and db/config.x11.site that set library and include paths for X, respectively.
I'm not at all familiar with any of this, but I guess this is all generated by autoconf or something similar and the configure file sets the -I for gcc etc, right?

The package from http://hackage.haskell.org
did have a configure script that I guess was generated by configure.ac, so from what I understand it should have set the correct include libraries.
Anyway it worked when I set CPATH manually, so I guess the error was in the configure script.
I was trying to install xmonad-contrib and xmobar, I guess xmonad-contrib worked but not xmobar since it needs a newer haskell compiler. In my humble newbie opinion it is a pity that there is not more xmonad in openbsd, since it is sucha nice windowmanager, but I guess http://www.openbsd.org/faq/faq1.html#HowAbout rules

Quote:
Originally Posted by jggimi
See www.openbsd.org/porting.html for the start of many web pages on porting applications.
I will look at this when I have some more time. Thank you very much again!
Reply With Quote
  #5   (View Single Post)  
Old 3rd December 2008
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Autoconf has nothing to do with the port/package infrastucture, which are perl scripts and the scaffolding for about 5000 applications. Autoconf is used by many ports, however -- there are ten incompatible versions of autoconf in the ports tree and metaauto to support the selection of the appropriate one -- but autoconf, where used, was a selection by the application developers, who prefer GNU-style configuration and build tools.

As BSDfan666 suggests, you are free to set environment variables as you desire, when importing code from-the-wild. My intent was to indicate where you could go to learn how it's done for properly ported X applications.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What include and shared library directories are searched by gcc kasse FreeBSD General 3 16th July 2008 08:44 PM


All times are GMT. The time now is 03:06 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick