Recompuling linux apps

AdmiralAK

Simply Daemonic
I have found several linux apps (and theor source codes) that can be useful, what do I do to
use them in OS X ?
 
I've been trying to recompile both mySQL and PHP4 with no success so far. Strangely, mySQL compiled and installed on OSX Server without a glitch.

I have managed to compile and install PHP (had to work around several things and to disable some) but the module does not work with apache yet.


If there are more experienced people out there that have achieved some success please post here.

I'll post a more comprehensive update if I get lucky (unlikely).
 
I've compiled several apps, w/ no probs. I recently tried to install the glib and gtk libraries, but no luck :(. I'd looove to get GAIM working but I won't even bother to try :). I also tried Xfree86. It started to launch, but quit a few seconds after video appeared. Here's a list of the apps that worked fine for me:

nmap
Saint 3.0 b2
samba
ncftp
lynx
dhcp (and for some reason dhclient won't renew my ip...)

There were others but I forget....

Justin

G3/350 w/ 758 megs ram
 
I got the terminal version of vim to compile
with only one minor source change (something
to do with function delclaration, nothing big).

-chris
 
Is it just me, or isn't it true that Xwindows apps won't just run after a single recompile on OS X. I mean the GUI is totally different. Command line apps should work fine i think, like samba.
 
I've tried to compile a few linux apps (all ones where I had the source code), and the problem I always seem to have is I get an error while running the ./configure script of "host type not specified"... I know I can specify the host type in most cases by adding --host= and then the host type, but I don't know what to put there for OS X. If I put bsd there, for example, it gives me the error that it's an unrecognised host type, but then finishes the configure script... but unfortunately I then get an error when a run a make. Anyone know how to get around that?
 
LunaMorena,

Try:

./configure --host=powerpc

The default (if you use the /usr/libexec/config.guess instead of the config.guess supplied with the source code) seems to be: powerpc-apple-darwin1.2. This seems to make configure very confused.

I can't claim to have had great luck in compiling Linux apps, but this at least gets me part way down the racetrack.

Dave
 
./configure --host=powerpc-apple-freebsd
works fine for me most of the time... you can get the whole list of the options if you grep the configure files.
it was the best option I could find as it is PPC FreeBSD, and Darwin is fbsd based. Using the powerpc-apple-darwin1.2 does not help as the configure scripts do not know OS X yet.
 
Well, I have ported a few things, mainly for AfterStep (very cool, thanks Steve J.) on Darwin, like the xiterm, ASClock 2.0 (no, not the 1.0), etc ...
but I often miserabily fail because of this message :

/usr/bin/ld: can't locate file for: -lm

I know it is the Mathlib, so what ??? What can I do to get rid of this error message ?
(Am I stupid ???) Do I have to install it, or is it allready here (I haven't found it).
Maybe under an other name. If I could get rid of this, 90% of my problems would be solved ....

anyone can help ?
 
The general procedure would look something like this:
tar xzf yourapp.tar.gz
cd yourapp/
./configure --host=powerpc-apple-freebsd
make
su
[type in your password]
make install

Of course you will need the development utilities installed.

If you have linux software, most likely it will give you errors that it could not find some header files, as BSD uses different ones. Use man to find the right location and change it in the sourcecode. (e.g. it cannot find ip.h, type in man ip, and under sytax it will give you the right location. vi yourapp.c and change e.g. net/ip.h to sys/ip.h or whatever it needs to be).

DiskBreaker

 
If anyone is interested, the source code to TripWire, the system integrity checker was released today under the GPL. I found a new version already on http://freshmeat.net this afternoon

The following was posted on freashmeat:

Tripwire

Tripwire is a system integrity checker, a utility that compares
properties of designated files and directories against information
stored in a previously generated database. Any changes to these files
are flagged and logged, including those that were added or deleted,
with optional email reporting. Additionally, support files
(databases, reports, etc.) are cryptographically signed.

urls  
Download: http://www.tripwire.org/downloads/index.php
Alternate Download: http://www.sourceforge.net/projects/tripwire/
Homepage: http://www.tripwire.org/

information  
Stable Version: 2.3
Author: Tripwire, Inc. <info at tripwire.com>
License: GPL
Category: Console/Firewall and Security
Project ID: 832
 
Just remove the -lm from the args. There seems to be no need
to explicitly link in the math libraries (or other libraries
like pthread).

-chris

Originally posted by Icespit
Well, I have ported a few things, mainly for AfterStep (very cool, thanks Steve J.) on Darwin, like the xiterm, ASClock 2.0 (no, not the 1.0), etc ...
but I often miserabily fail because of this message :

/usr/bin/ld: can't locate file for: -lm

I know it is the Mathlib, so what ??? What can I do to get rid of this error message ?
(Am I stupid ???) Do I have to install it, or is it allready here (I haven't found it).
Maybe under an other name. If I could get rid of this, 90% of my problems would be solved ....

anyone can help ?
 
Thanks DiskBreaker !
It helps ... but now I have other errors coming through. This start to be a little complicated.

/usr/bin/ld: Undefined symbols:
_XCreatePixmap
_XPutImage
_XCreateImage
_XDefaultColormap
_XDefaultDepth
_XDefaultScreen
_XDefaultVisual
_XFreeColors
_XGrabServer
_XQueryColors
_XUngrabServer
_XCheckIfEvent
_XClipBox
_XCreateRegion
_XEmptyRegion
_XEventsQueued
_XFilterEvent
_XIntersectRegion
_XNextEvent
_XPeekEvent
_XPending
_XUnionRectWithRegion
_XResourceManagerString
_XScreenNumberOfScreen
_XScreenResourceString
_XrmParseCommand
_XCreateWindow
_XMapSubwindows
_XClearArea
_XConfigureWindow
_XDestroyRegion
_XDisplayKeycodes
_XDisplayName
_XDeleteContext
_XFindContext
_XSaveContext
_XMapRaised
_XRaiseWindow
_XWithdrawWindow
_XKeysymToString
_XAllocNamedColor
_XCreateFontCursor
_XDisplayOfScreen
_XFreeCursor
_XLookupColor
_XQueryColor
_IceConnectionNumber
_IceProcessMessages
_SmcClientID
_SmcCloseConnection
_SmcDeleteProperties
_SmcGetIceConnection
_SmcInteractDone
_SmcInteractRequest
_SmcModifyCallbacks
_SmcOpenConnection
_SmcRequestSaveYourselfPhase2
_SmcSaveYourselfDone
_SmcSetProperties
_XAllocSizeHints
_XChangeWindowAttributes
_XDeleteProperty
_XIconifyWindow
_XSetCommand
_XSetTransientForHint
_XSetWMHints
_XSetWMIconName
_XSetWMName
_XSetWMProperties
_XTranslateCoordinates
_XWMGeometry
_XUnmapWindow
_XGrabButton
_XGrabKey
_XGrabKeyboard
_XGrabPointer
_XUngrabButton
_XUngrabKey
_XUngrabKeyboard
_XUngrabPointer
_XListDepths
_XMaxRequestSize
_XNextRequest
_XSetSelectionOwner
_XQueryPointer
make: *** [asmail] Error 1

I chose this one because there are plenty of comments. I suppose it as to do with XPm, although I believe I installed it right. Any suggestions ???
 
Ah, to get that to compile you need X windows
(like XFree86 or possibly tenons Xtools).
That is the linker complaining that it can't find
the X graphics and event functions. Try this link
http://www.mrcla.com/XonX/ for XFree86 on Darwin.


-chris

Originally posted by Icespit
Thanks DiskBreaker !
It helps ... but now I have other errors coming through. This start to be a little complicated.

/usr/bin/ld: Undefined symbols:
_XCreatePixmap
_XPutImage
_XCreateImage
_XDefaultColormap
[snip]
nOwner
_XQueryPointer
make: *** [asmail] Error 1

I chose this one because there are plenty of comments. I suppose it as to do with XPm, although I believe I installed it right. Any suggestions ???
 
<P>I'm trying to install ncurses 5.2 and I can get it to successfully run the 'configure' and 'make' steps. When I run 'make install' as root it bombs out with the following error: :confused:

<PRE>
** Building terminfo database, please wait...
** adjusting tabset paths
Running tic to install /usr/local/share/terminfo ...

You may see messages regarding unknown capabilities, e.g., AX.
These are extended terminal capabilities which can be compiled
using
tic -x
Read the INSTALL document before doing this - it can cause
problems for older ncurses applications.

"/tmp/9445", line 395, col 3, terminal 'ecma+color': unknown capability 'AX'
"/tmp/9445", line 3193, col 40, terminal 'screen': unknown capability 'G0'
"/tmp/9445", line 3212, col 59, terminal 'screen': unknown capability 'E0'
"/tmp/9445", line 3213, col 12, terminal 'screen': unknown capability 'S0'
"/tmp/9445", line 3165, terminal 'eterm': name multiply defined.
"/tmp/9445", line 12958, terminal 'NCR260VT300WPP': can't link N/NCR260VT300WPP to n/ncr260vt300wpp
? tic could not build /usr/local/share/terminfo
make[1]: *** [install.data] Error 1
make: *** [install] Error 2
</PRE>

<P>Can anyone help me translate this error into some form of english so I can successfully install the program.

<P>Thanks much for any/all help. :)
 
Originally posted by Icespit
Well, I have ported a few things, mainly for AfterStep (very cool, thanks Steve J.) on Darwin, like the xiterm, ASClock 2.0 (no, not the 1.0), etc ...
but I often miserabily fail because of this message :

/usr/bin/ld: can't locate file for: -lm

I know it is the Mathlib, so what ??? What can I do to get rid of this error message ?
(Am I stupid ???) Do I have to install it, or is it allready here (I haven't found it).
Maybe under an other name. If I could get rid of this, 90% of my problems would be solved ....

anyone can help ?

The mathlib is available (if you still need it) at Apple's Darwin site:
http://www.publicsource.apple.com//projects/darwin/projects.html

I had an old app that refused to compile without it. It seems to work just Dandy. -- Dave
 
Back
Top