aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Compiling aMule command-line in NetBSD  (Read 4392 times)

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
Compiling aMule command-line in NetBSD
« on: May 25, 2008, 01:58:04 PM »

NetBSD 4.0 i386, manually built wxWidgets 2.8.7, aMule SVN 20080524

This is only about getting the things to build and run, not about any runtime issues.
Please don't jump on me about the proposed fixes - I'm sure there are better ways to do stuff and I have no idea how to actually implement most of these :p

Starting with vanilla ./configure --enable-amule-daemon  --enable-amulecmd  --enable-webserver --disable-monolithic --with-toolkit=base --enable-geoip --enable-cas --enable-alcc

Problems:

1) configure cannot find header files for things like gd, geoip etc because in NetBSD the user-installed packages go in /usr/pkg

Workaround: Add -I/usr/pkg/include to CFLAGS/CXXFLAGS/CPPFLAGS and -L/usr/pkg/lib to LDFLAGS
Fix: configure should detect NetBSD and use the include and lib directories under /usr/pkg

2) configure says that system does not have exception handling. In reality, the test progam is compiled with -lGeoIP and it fails because GeoIP .so file is not found

Workaround: Add -R/usr/pkg/lib to LDFLAGS
Fix: See 1) and avoid using unneeded flags for test programs to avoid confusion?

3) Cannot find crypto header

Workaround: Give the --with-crypto-prefix parameter to configure
Fix: The Crypto++ check should use the system include dirs specified above

4) BSD make does not work

Workaround: Use gmake
Fix: configure should detect and force/recommend the use of GNU make. See http://ac-archive.sourceforge.net/ac-archive/check_gnu_make.html

5) file_generator.pl script cannot be run because the perl path is hardcoded to the hashbang line in the scriptifile

Workaround: Fix the script
Fix: Configure should detect the perl path and the script should be called explicitly with the detected path a la "$PERL file_generator.pl file.abstract"

6) libintl.a is not found in ${top_builddir}/intl/ when linking amuleweb

Workaround: run gmake in amule-cvs/intl directory to build it before aMule itself
Fix: Bundled libintl (when used) should be built before any apps that need it

7) amuled crashes at startup in InitLocale. Maybe because configure couldn't find GNU gettext anywhere?

Workaround: Use --disable-nls with configure
Fix: Try harder to make sure that everything is OK with i18n before trying to localize?

So we end up with the following:
Code: [Select]
export CFLAGS="-I/usr/pkg/include"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="-I/usr/pkg/include"
export LDFLAGS="-R/usr/pkg/lib -L/usr/pkg/lib"
./configure --enable-amule-daemon  --enable-amulecmd  --enable-webserver --disable-nls --disable-monolithic --with-toolkit=base --with-crypto-prefix=/usr/pkg --enable-geoip --enable-cas --enable-alcc
gmake
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Compiling aMule command-line in NetBSD
« Reply #1 on: May 26, 2008, 02:10:02 AM »

Thank you for your feedback! It's much appreciated. I hope someone has soon a look at these issues, or I'll give it a try myself as soon as I can.
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: Compiling aMule command-line in NetBSD
« Reply #2 on: May 28, 2008, 05:21:04 PM »

Thanks for your report. I fixed #2, for the others I'd need to know what is the host triplet of your NetBSD box. I assume it is something like *-netbsd-*
You can find it out by looking into config.log, it's near the top.
Code: [Select]
## ----------- ##
## Core tests. ##
## ----------- ##

configure:1446: checking build system type
configure:1464: result: i686-pc-linux-gnu
configure:1472: checking host system type
configure:1486: result: i686-pc-linux-gnu
Logged
concordia cum veritate

gtoso

  • Official MacOSX Packager
  • Full Member
  • ***
  • Karma: 24
  • Offline Offline
  • Posts: 206
Re: Compiling aMule command-line in NetBSD
« Reply #3 on: May 28, 2008, 06:30:57 PM »

Thanks for your report. I fixed #2, for the others I'd need to know what is the host triplet of your NetBSD box. I assume it is something like *-netbsd-*

Hi, I think #3 could be fixed indipendently from platform.
I must use "--with-crypto-prefix" on Mac OSX Tiger, too:
http://gtoso.tor.it/pub/amule/osx/svn/src/old/amule-uni-geoip

When I wrote this script I needed to  use --with-geoip-headers/lib,
now I don't know.

PS:
What is the mean of --with-geoip-static?
If it should statically link the GeoIP lib, it doesn't work on OSX.
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: Compiling aMule command-line in NetBSD
« Reply #4 on: May 28, 2008, 06:53:18 PM »

I must use "--with-crypto-prefix" on Mac OSX Tiger, too
Unfortunately, to detect crypto++ installation in anywhere but /usr, you *must* specify --with-crypto-prefix. That is because some oddity in crypto++ installation and sources.
Logged
concordia cum veritate

Nodsu

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 62
Re: Compiling aMule command-line in NetBSD
« Reply #5 on: June 03, 2008, 10:46:52 PM »

For my NetBSD box, the string is i386-unknown-netbsdelf4.0.0, but since NetBSD is a cross-platform OS, it could be anything like arm--netbsdelf, m68k--netbsdelf or whatever. I think it would be OK to just check for *-*-netbsd*
Logged