aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: HowTo compile on Mac UPDATED  (Read 4631 times)

one2one

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 18
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: HowTo compile on Mac UPDATED
« Reply #1 on: September 28, 2004, 06:38:47 PM »

I fixed it to remove the cryptopp needing, we're using the embedded one now.
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: HowTo compile on Mac UPDATED
« Reply #2 on: October 07, 2004, 06:52:25 PM »

I'm probably excessively concerned about this, but I prefer not to install anything into the system directories (even /usr/local) if I can at all avoid it.  Because of that, I've been reluctant to install wxMac in order to compile aMule.  So, I searched around and found this: http://umn.dl.sourceforge.net/sourceforge/wxwindows/install-mac-2.5.2.txt (look under the Apple Developer Tools section) which suggests using --disable-shared to build a static library and the --in-place argument to wx-config.

Quite frankly, I couldn't figure out the "--in-place" option, so instead I used
Code: [Select]
--prefix=${HOME}/wxinstall so that wxMac would install under my home directory.  Therefore the
Code: [Select]
make install command doesn't need "sudo".

Then, when configuring aMule, I supplied
Code: [Select]
--with-wx-prefix=${HOME}/wxinstall --with-wx-config=${HOME}/wxinstall/bin/wx-config instead of references to /usr/local.

Anyway, taken together, these provide a way to build aMule on the mac without installing anything into system directories and the resultant executable doesn't require that shared libraries be installed on a system in order to run.

I don't know if people find this preferable, but I figured I'd share the info so others could decide for themselves.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: HowTo compile on Mac UPDATED
« Reply #3 on: October 07, 2004, 07:34:05 PM »

I find it fairly useful. I was using shared wx libs on the Contents folder of the .app, and changing the linking info or aMule to take them from there on startup. Which one would be preferable? I think the static lib is monolithic, so it's much bigger?
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: HowTo compile on Mac UPDATED
« Reply #4 on: October 07, 2004, 08:03:31 PM »

Quote
Originally posted by Kry
I find it fairly useful. I was using shared wx libs on the Contents folder of the .app, and changing the linking info or aMule to take them from there on startup. Which one would be preferable? I think the static lib is monolithic, so it's much bigger?

I haven't compared.  In theory, the shared library has to include everything whether amule uses it or not because it's compiled under no assumptions about what program might be using it.  On the other hand, with a static library the linker could pick and choose those objects actually referenced by amule and only include those.  I don't know if it actually does that, though.

I think the only advantage of the shared library would be in the case that multiple programs simultaneously used the library, it would only have to be on disk and loaded into memory once.

Here's what hard data I have.  My amule.app folder is 48.8 MB (51,148,958 bytes).  After I strip debugging symbols, it's 5.8 MB (6,127,047 bytes).  I don't have a shared library build to compare it against.  You should compare it to yours.  By the way, this is an RC6 build, not a CVS buld.
Logged

pick

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 36
    • http://www.pickzik.com
Re: HowTo compile on Mac UPDATED
« Reply #5 on: October 08, 2004, 09:42:17 AM »

If I put my wxmac folder into Home and put :
Code: [Select]
--with-wx-prefix=${HOME}/wxinstall --with-wx-config=${HOME}/wxinstall/bin/wx-configinto ./configure, do you think i'll be able to compile amule without reinstalling wxmac ? (i've trashed wxmac src and don't want to waste time to recompiling it ;))
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: HowTo compile on Mac UPDATED
« Reply #6 on: October 10, 2004, 04:56:18 AM »

Quote
Originally posted by pick
If I put my wxmac folder into Home and put :
Code: [Select]
--with-wx-prefix=${HOME}/wxinstall --with-wx-config=${HOME}/wxinstall/bin/wx-configinto ./configure, do you think i'll be able to compile amule without reinstalling wxmac ? (i've trashed wxmac src and don't want to waste time to recompiling it ;))
Hmmm...  I'm not sure.  I would guess that this wouldn't exactly work.  There are two issues, I think:

1) When you configure wxMac before making it, I think it is hard-coded to know where it is going to be installed.  In particular, wx-config will report wrong values to the amule build process.  (wx-config is a program built as part of making wxMac.  Its job is to report various information so that other programs, like the amule build process, can learn where wxMac files are to be located.)

2) Without recompiling, you don't switch from building a shared library to building a static library.
Logged