aMule Forum
English => Multiplatform => Mac OSX => Topic started by: one2one on September 28, 2004, 10:48:38 AM
-
http://www.amule.org/wiki/index.php/HowTo_compile_on_Mac
-
I fixed it to remove the cryptopp needing, we're using the embedded one now.
-
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 --prefix=${HOME}/wxinstall
so that wxMac would install under my home directory. Therefore the make install
command doesn't need "sudo".
Then, when configuring aMule, I supplied --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.
-
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?
-
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.
-
If I put my wxmac folder into Home and put :
--with-wx-prefix=${HOME}/wxinstall --with-wx-config=${HOME}/wxinstall/bin/wx-config
into ./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 ;))
-
Originally posted by pick
If I put my wxmac folder into Home and put :
--with-wx-prefix=${HOME}/wxinstall --with-wx-config=${HOME}/wxinstall/bin/wx-config
into ./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.