|Printable Version of Topic
Click here to view this topic in its original format
|XMail Forum > Documentation and Knowledge Base > Compiling Source On Mac Os X Leopard|
|Posted by: jdsmith Apr 28 2008, 01:15 AM|
| I'm trying to compile the source for Mac OS X, Version 10.5.2 Build 9C7010 (current release). I followed the directions in the Knowledge Base forum (found http://xmailforum.homelinux.net/index.php?showtopic=2005 which is obviously VERY outdated). Also, I tried using the Search link to find an answer to my problem as well, but it's broken so that was a fail.
I'm assuming we're (still) supposed to use the Makefile.bsd to compile the source. I typed the following in the terminal.
computer_name:xmail-1.25 jdsmith$ make -f Makefile.bsd
g++ -o bin/MkMachDep MkMachDep.o -lssl -lcrypto -lkvm -lpthread
ld: library not found for -lkvm
collect2: ld returned 1 exit status
make: *** [bin/MkMachDep] Error 1
I know that compiling XMail requires OpenSSL, which I have compiled and placed in the same directory as the Makefile.bsd file. Is this incorrect?
If anyone understands this process better, please explain this for me. Or better yet, if you can get the Search to work in these forums just do a simple search for me and post the link here!
|Posted by: hschneider Apr 28 2008, 08:51 AM|
|Hangon .. I'm checking this out ...|
|Posted by: jdsmith Apr 28 2008, 08:00 PM|
|I have an update to the problem. the -lkvm flag is looking for the 'kvm' library. Is there a Kernel-based Virtual Machine for the Mac (Darwin kernel) available? I've done some searching and haven't found anything that's of much use.|
|Posted by: hschneider Apr 29 2008, 06:23 AM|
|The source has to be modified for compiling this on leopard. Pls hangon, I'll post it here ASAP. Thanks for your patience!|
|Posted by: jdsmith Apr 29 2008, 07:59 PM|
| Thanks, Harald!
I'll be patient. Another question though, on a similar topic. I'm interested in compiling this on the iPhone! I'm guessing that This may be difficult since I doubt you support the ARM processor the iPhone utilizes. Or maybe I'm wrong altogether!
This is of great importance to my project.
Thanks for your replies thus far,
|Posted by: hschneider Apr 30 2008, 10:30 AM|
| Install XCodeTools.mpkg from "Optional Installs/Xcode Tools" of your Leopard DVD.
If you upgraded from Tiger, then remove /Developer before you do this.
Download and unpack the original archive:
tar -xvzf xmail-1.25.tar.gz
Download and unpack http://www.marketmix.com/downloads/xmail-125_Fix_Leopard.zip
Copy its content to the xmail-1.25 folder.
OSTYPE=Darwin10.5 make -f Makefile.bsd
|Posted by: hschneider Apr 30 2008, 10:35 AM|
| >I'm guessing that This may be difficult since I doubt you support the ARM processor
If you have a GCC toolchain which supports ARM, then the chances are good that this runs with none or minor source code modifications on the iPhone. Give it a shot with the patched and unpatched source as well.
|Posted by: jdsmith Apr 30 2008, 10:19 PM|
| Thanks again, Harald.
Your Leopard fix did the trick! I hope this patch will be part of the next release, 1.26~ or so.
I will do some more research with the GCC Toolchain for ARM and let you know how it goes. Pretty exciting stuff!
|Posted by: jdsmith May 1 2008, 02:46 AM|
| Hi again, Harald.
I've been running the XMail product for nearly 2 years now on the Win32 platform with little to no problems. It may be the fact that I'm reacquainting myself with the unix filesystem. But as of right now I can't run the XMail server still on OS X.5.
I've followed your instructions, unzipped your patch and over-written such files in the 1.25 XMail release. I've executed:
OSTYPE=Darwin10.5 make -f Makefile.bsd
and the build succeeded. After the build I now have the following files in the ~/my_tmp_folder/xmail-1.25/bin directory:
CtrlClnt, MkMachDep, MkUsers, sendmail, XMail, XMCrypt
Great! Now, however, I notice that these executable files are not in the xmail-1.25/MailRoot/bin directory as I know they are required to be. I double checked this by looking at the xmail-1.25/xmail.bsd file to run the program and found XMAIL_ROOT set to /var/MailRoot and deduced that these bin files must be in MailRoot/bin folder. I copied them. Lastly I copied the MailRoot folder from my temporary location to the desired /var directory.
I executed: xmail.bsd start in the Terminal after adding execute permissions (chmod a+r+x xmail.bsd) and the following occurred:
computer_name:xmail-1.25 jdsmith$ ./xmail.bsd start
./xmail.bsd: line 24: /etc/rc.subr: No such file or directory
I did a locate rc.subr and have zero results. Apparently it's not available on the Mac. Instead, I tried the same thing with xmail but it didn't do anything. I killed it:
computer_name:xmail-1.25 jdsmith$ ./xmail start
-n Starting XMail Server:
|Posted by: hschneider May 1 2008, 08:08 AM|
| You cannot use the BSD startup script with OSX.
Scroll down to my post from Sep 7 2004, 09:49 AM, it explains how to install it as an OSX service.
All this assumes MailRoot located in /var/MailRoot with the same structure and permissions as described in the manual.
To verify its functionality, you can do a quick test from the terminal before running the service:
sudo ./XMail --debug -Md -SI 127.0.0.1:2025
From another terminal enter:
telnet 127.0.0.1 2025
This should bring up XMail's welcome message.
If you decide to run XMail on port 25, then you additionally need to disable Postfix which differs from my howto under Tiger. On Leopard you'll need to enter:
sudo /bin/launchctl unload -w /System/Library/LaunchDaemons/org.postfix.master.plist
To enable Postfix again:
sudo /bin/launchctl load -w /System/Library/LaunchDaemons/org.postfix.master.plist