# freenet in Gentoo

## Junyx

Hello!

i want to install freenet (freenetproject.org) under gentoo-2.6.17-gentoo-r4 (genkernel build).

first i tried the offically supported ebuild. this didn't work for me (ebuild [...] config failed).

then i downloaded the .tgz from the website (latest version 0.5).

using sun-jdk-1.4.2-... i could start freenet.jar with the supplied start-freenet.sh script.

java is started and everything looks just right. but!!!

there are no open connections (fproxy, incoming port, ...)

no store file is created, no stats, and so on.

is there anybody out there who has freenet currently running on her gentoo-box?

thx in advance for your help...

Junyx

----------

## sternklang

Hi,

If you run into a problem with a package in portage, it makes much more sense to ask for help on the forums then, rather than giving up and trying the upstream tarball. I can't really help you with that installation since I'm not going to try to reproduce it on my machine. If you uninstall that and try the portage version, I can try to help you.

Could you post the config errors you ran into? I had no problem emerging and configuring freenet, the freenet gateway page is open in another tab as I write this. Also, could you post the output of "emerge --info"?

----------

## Junyx

well sternklang, thanks for your offer to help!

i am a bit impatient sometimes, therefore i quickly grabbed the tarball. my wrong.

right now i deleted all traces of freenet and emerged the ebuild.

below you see what happens:

box ~ # ebuild /usr/portage/net-p2p/freenet/freenet-0.5.2.1-r8.ebuild config

 * Would you like to update freenet files now? [Y/n]

Y

 * Press U within 2 seconds to try an unstable snapshot

[nothing pressed]

--17:33:09--  http://downloads.freenetproject.org/freenet-stable-latest.jar

           => `/usr/lib/freenet/freenet.jar'

[...]

Length: 2,590,917 (2.5M) [application/octet-stream]

[...]

17:33:32 (121.63 KB/s) - `/usr/lib/freenet/freenet.jar' saved [2590917/2590917]

--17:33:32--  http://downloads.freenetproject.org/seednodes/seednodes.ref.bz2

           => `/var/freenet/seednodes.ref.bz2'

[...]

Length: 641,335 (626K) [text/plain]

[...]

17:33:38 (115.78 KB/s) - `/var/freenet/seednodes.ref.bz2' saved [641335/641335]

 * Preparing to configure freenet...

Freenet Configuration

Running in simple mode. Some preferences will be skipped.

You can choose the default preferences by just hitting <ENTER>

[i did NOT hit anything here! but it continues anyways...]

Setting: listenPort

The port to listen for incoming FNP (Freenet Node Protocol) connections on.

os.arch = i386

Loading native...

Attempting to load freenet/support/CPUInformation/libjcpuid-x86-linux.so

ERROR: Resource name [freenet/support/CPUInformation/libjcpuid-x86-linux.so] was not found

WARN: Native CPUID library jcpuid not loaded - will not be able to read CPU information using CPUID

NOTICE: Resource name [net/i2p/util/libjbigi-linux-none.so] was not found

INFO: Native BigInteger library jbigi not loaded - using pure java

[here it gets stuck. neither /etc/freenet.conf was created nor does freenet actually run (no ports opened).

 i had to ctrl-c here to go on with my work   :Shocked: 

 manually creating /etc/freenet.conf and starting /etc/init.d/freenet gives the same outcome: freenet

 does not start (again: no ports opened.]

#########################################################################################################

box ~ # emerge --info

Portage 2.1-r2 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17-gentoo-r4 i686)

=================================================================

System uname: 2.6.17-gentoo-r4 i686 AMD Athlon(TM) XP 1800+

Gentoo Base System version 1.12.4

ccache version 2.3 [disabled]

app-admin/eselect-compiler: [Not Present]

dev-lang/python:     2.4.3-r1

dev-python/pycrypto: 2.0.1-r5

dev-util/ccache:     2.3

dev-util/confcache:  [Not Present]

sys-apps/sandbox:    1.2.17

sys-devel/autoconf:  2.13, 2.59-r7

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2

sys-devel/binutils:  2.16.1-r3

sys-devel/gcc-config: 1.3.13-r3

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.11-r2

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -march=athlon-xp -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"

CXXFLAGS="-O2 -march=athlon-xp -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"

GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo "

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="x86 3dnow apm avi ccache cli crypt emboss encode gdbm gif gpm imlib jpeg libg++ libwww mad maildir mikmod mime mmx motif mp3 mpeg ncurses nls nptl ogg pam pcre pdflib perl png pppd python readline reflection session spell spl ssl symlink tcpd udev vorbis xml zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU"

Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

#########################################################################################################

box ~ # java-config -L

[sun-jdk-1.4.2.10] "Sun JDK 1.4.2.10" (/etc/env.d/java/20sun-jdk-1.4.2.10) *

[blackdown-jdk-1.4.2.03] "Blackdown JDK 1.4.2.03" (/etc/env.d/java/20blackdown-jdk-1.4.2.03)

#########################################################################################################

i hope these logs help you in identifying what might be the problem here.

would be great if i get freenet running. (besides: if my winbox manages it then Gentoo has to be able to run freenet  :Wink: 

Junyx

----------

## sternklang

 *Junyx wrote:*   

> INFO: Native BigInteger library jbigi not loaded - using pure java
> 
> [here it gets stuck. neither /etc/freenet.conf was created nor does freenet actually run (no ports opened).
> 
>  i had to ctrl-c here to go on with my work  

 

At the point where you thought it got stuck, you actually had to hit enter, and hit enter on each succeeding setting if you wanted to go with the defaults. This config script is not exactly intuitive, so it's understandable why you didn't think to do that.

----------

## Junyx

well, the ebuild does not work for me out of the box.

but i managed to start it manually with:

"java -Xmx256M -jar freenet.jar -p /etc/freenet.conf  > /var/freenet/freenet.stdout.log 2> /var/freenet/freenet.stderr.log"

only one problem remains: this will only work with "freenet.jar Build: 5015".

after updating to "Build: 5107" java suddenly stops starting freenet alltogether.

could you possibly post

1) what freenet.jar build you use

2) what version of java (and if sun or blackdown or ...)

3) what your $CLASSPATH is saying

hopefully this will clarify some aspects.

Junyx

----------

## sternklang

I'm running sun-jdk-1.5 as my system vm, and build 5107 starts with no problem. CLASSPATH=.

Have you migrated your system to the new java setup yet?

Edit: That is sun jdk 1.5.0.08 to be exact.

----------

## Junyx

i think i must go crazy...

now i migrated to "Sun JDK 1.5.0.08 [sun-jdk-1.5]" (with help of the guide).

starting "freenet.jar BUILD 5107" has exactly the same effect as before:

freenet gets stuck.

freenet.log shows: "Aug 17, 2006 10:59:40 PM (freenet.node.Main, main, NORMAL): Starting Freenet (Fred) 0.5 node, build #5107 on JVM Sun Microsystems Inc.:Java HotSpot(TM) Client VM:1.5.0_08-b03"

more does not happen...

well, i have one more idea what could be the problem.

1) do you have "export LD_ASSUME_KERNEL=2.4.1" uncommented in /etc/init.d/freenet?

2) what are your USE flags?

mine are these:

box ~ # euse -a

3dnow               [+ C  ]

apm                 [+  D ]

ccache              [+ C  ]

cli                 [+  D ]

crypt               [+  D ]

emboss              [+  D ]

encode              [+  D ]

gdbm                [+  D ]

gif                 [+  D ]

gpm                 [+  D ]

imlib               [+  D ]

jpeg                [+  D ]

libg++              [+  D ]

libwww              [+  D ]

mad                 [+  D ]

maildir             [+ C  ]

mikmod              [+  D ]

mime                [+ C  ]

mmx                 [+ C  ]

motif               [+  D ]

mp3                 [+  D ]

mpeg                [+  D ]

ncurses             [+  D ]

nls                 [+  D ]

nptl                [+  D ]

ogg                 [+  D ]

pam                 [+  D ]

pcre                [+  D ]

perl                [+  D ]

png                 [+  D ]

pppd                [+  D ]

python              [+  D ]

readline            [+  D ]

reflection          [+  D ]

session             [+  D ]

spell               [+  D ]

spl                 [+  D ]

ssl                 [+  D ]

symlink             [+ C  ]

tcpd                [+  D ]

udev                [+  D ]

vorbis              [+  D ]

xml                 [+  D ]

zlib                [+  D ]

i do suspect nptl or some java related flags... but i certainly don't know for sure   :Crying or Very sad: 

thx again...

Junyx

----------

## sternklang

No, I haven't touched the initscript. As for USE flags, here's my "emerge --info" so you can see them, as well as if there's anything else that might spark an idea:

```
Portage 2.1.1_pre5-r2 (default-linux/amd64/2006.0, gcc-4.1.1, glibc-2.4-r3, 2.6.17-ck1-r2 x86_64)

=================================================================

System uname: 2.6.17-ck1-r2 x86_64 AMD Athlon(tm) 64 Processor 3000+

Gentoo Base System version 1.12.4

Last Sync: Thu, 17 Aug 2006 18:50:01 +0000

ccache version 2.4 [enabled]

app-admin/eselect-compiler: [Not Present]

dev-lang/python:     2.4.3-r1

dev-python/pycrypto: 2.0.1-r5

dev-util/ccache:     2.4-r2

dev-util/confcache:  0.4.2-r1

sys-apps/sandbox:    1.2.18.1

sys-devel/autoconf:  2.13, 2.60

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2

sys-devel/binutils:  2.16.1-r1, 2.16.93, 2.17, 2.17.50.0.2, 2.17.50.0.3

sys-devel/gcc-config: 1.3.13-r3

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.16

ACCEPT_KEYWORDS="amd64 ~amd64"

AUTOCLEAN="yes"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=k8 -O2 -pipe -ggdb"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib64/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config"

CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"

CXXFLAGS="-march=k8 -O2 -pipe -ggdb -ffriend-injection"

DISTDIR="/var/portage/distfiles"

EMERGE_DEFAULT_OPTS=""

FEATURES="autoconfig ccache confcache distlocks fixpackages parallel-fetch sandbox sfperms splitdebug strict"

GENTOO_MIRRORS="http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://gentoo.osuosl.org/ "

LANG="en_US.UTF-8"

LC_ALL="en_US.UTF-8"

LINGUAS="en"

MAKEOPTS="-j2"

PKGDIR="/var/portage/packages"

PORTAGE_RSYNC_EXTRA_OPTS="--timeout=120"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage /usr/local/bmg-main /usr/portage/local/layman/gentopia /usr/portage/local/layman/sunrise /usr/portage/local/layman/portage-xgl /usr/portage/local/layman/break-my-gentoo-main /usr/portage/local/layman/stuart-desktop /usr/portage/local/layman/wrobel"

SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"

USE="amd64 X aac alsa avi bash-completion berkdb bitmap-fonts bzip2 cairo cdr cli crypt cups dbus debug dlloader dri dvd dvdr eds elibc_glibc emboss encode esd firefox flac foomaticdb fortran gdbm gif glitz gnome gpm gstreamer gtk gtk2 hal imlib input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog java jpeg kde kdehiddenvisibility kernel_linux ldap linguas_en lzw lzw-tiff mad mono mp3 mpeg ncurses nls nptl nptlonly ogg opengl pam pcre pdflib perl pic png pppd python qt3 quicktime readline reflection ruby samba sdl session spell spl sqlite ssl tcpd theora tiff truetype truetype-fonts type1-fonts unicode usb userland_GNU userlocales video_cards_nvidia video_cards_vesa vorbis xml xml2 xorg xpm xv zlib"

Unset:  CTARGET, INSTALL_MASK, LDFLAGS
```

----------

## Junyx

man, you are on the bleeding edge, aren't you: ACCEPT_KEYWORDS="~amd64"   :Razz: 

looking at your infos i see some stuff i could test.

namely: i have not set LANG, LC_ALL, LINGUAS, USE="java" and some more...

but not today. i am much too tired right now   :Embarassed: 

i will test everything tomorrow and report it here.

good night.

----------

## sternklang

 *Junyx wrote:*   

> man, you are on the bleeding edge, aren't you: ACCEPT_KEYWORDS="~amd64"  

 

Nah, spend some time in the Unsupported Software forum and watch some of the experimental gcc and glibc ebuilds with whacked out CFLAGS and LDFLAGS that people are using and you'll know what bleeding edge is.   :Smile: 

----------

## Junyx

a little status update from here:

i re-emerged my complete system using the USE settings from sternklangs listing (deleted some flag not needed for my server [X, cups, ...]).

unfortunately after emerge finished my bash didn't want to start any scripts anymore. glibc is broken as far as i can see...

i erased some more USE flags from make.conf and bash would start again. but the error in glibc remained.

so now i am still re-emerging my entire sys using some safer USE vars   :Crying or Very sad: 

this can take some time. after all it's only an rather old athlon xp 1800 i'm using.

Junyx

@sternklang:

one thing i wanted to ask you some time ago:

where does your handle/nick come from? at first i thought you were german because of your handle   :Wink: 

(in german it means "sound of star" - we germans like those word-concatenations  :Cool: 

----------

## sternklang

 *Junyx wrote:*   

> one thing i wanted to ask you some time ago:
> 
> where does your handle/nick come from? at first i thought you were german because of your handle  
> 
> (in german it means "sound of star" - we germans like those word-concatenations 

 

Some of my favorite music comes from German avant-garde composer Karlheinz Stockhausen (still very active in his 80's). One of those favorite pieces is something he wrote to be performed by several groups of musicians in an outdoor setting on a starry night, and that piece is called Sternklang (the available recording translates it as "Star-Sound").

Sorry to hear you ran into so much trouble just to get freenet running! With toolchain items like gcc and glibc, it's usually not a good idea to just change USE flags affecting them (nptlonly is probably the one that messed up glibc for you). For those, you should make whatever changes, rebuild the toolchain twice, then system, then world:

```
emerge glibc binutils gcc

emerge glibc binutils gcc

emerge -e system

emerge -e world 
```

This will take a long time, but it gives you a clean toolchain (built twice so the second time around everything is built with the latest version) and a consistent system.

Best of luck to you!   :Smile: 

----------

## Junyx

okay. now i have rebuilt the toolchain, emerged -e system and world.

and i found out that there is a bug in /etc/init.d/freenet (https://bugs.gentoo.org/show_bug.cgi?id=71835).   :Cool: 

did update /etc/sudoers accordingly and fired up /etc/init.d/freenet.

to my surprise, freenet started up like a charm (all .jars found in CLASSPATH and so forth).

BUT the old problem remains: freenet built 5107 does not open any tcp-sockets for listening.

i switched to the old built 5015 and everything runs smoothly.

frankly, i have no idea whatsoever, why 5107 does not work as expected...???   :Mad: 

i am some sort of fed up with all this right now and a bit pissed.

don't know wheter this is an issue of Gentoo or freenet.

i will eventually kill my Gentoo installation on my server and try Debian 3.1.

after all - the server was meant for running freenet regardless of Gentoo being installed or not.

i like Gentoo a lot more than Debian. but it doesn't do the job, so i have to switch.   :Rolling Eyes: 

Junyx

p.s.:

@sternklang:

thx for your tips! learnt a lot.

i'm going to set up my next desktop system running Gentoo. so your tips helped me a lot.

i even downloaded some music of K. Stockhausen (legally of course  :Razz: )

there are some very strange arrangements therby. you wouldn't call this music straight "classical", would you?!

----------

## sternklang

I'm glad to have helped!

Now that you have determined that it's a specific build that has a problem, you should file a new bug about it. This way, your experience with this could end up helping others with the same problem. It's a good way to give back to the Gentoo community to help fix things like this rather than just moving to a different distro.

If you do move, maybe you should try a Debian install in a virtual machine with the (free) vmware server  or vmware player first. It would be a sad thing to install a different distro and find you have the same problem. 

As for Stockhausen, he is one of a number of major composers starting in the 1950's (Boulez, Berio, Xenakis, Cage were others) who were determined to reinvent music and took it in many different new directions. Their training was classical, but their music is certainly not. 

Stockhausen in particular was one of the fathers of electronic music, and had a major influence on more popular electronic musicians from Kraftwerk and Tangerine Dream in the 70's to Aphex Twin in the 90's all the way to present-day electronica. So, it's a whole musical world in itself, not at all classical even when it uses the same instruments.

----------

## Simius

 *Junyx wrote:*   

> i am some sort of fed up with all this right now and a bit pissed.
> 
> don't know wheter this is an issue of Gentoo or freenet.
> 
> i will eventually kill my Gentoo installation on my server and try Debian 3.1.
> ...

 

Well, I think maybe asking for help on the freenet mailing lists would be more useful in your case. I doubt that this is really Gentoo's fault... (Sure, the defective ebuild IS Gentoo's fault, but you can always consult upstream.)

So if I were you, I'd stick with Gentoo and switch to using the upstream tarball of Freenet - and ask for support on the freenet mailing lists. It makes much more sense to me than reinstalling the entire server... Also I kind of hate Debian. Debian is the World's most actively supported abandonware.

----------

## Junyx

okay, i gave freenet on gentoo another chance   :Confused: 

but this time i launched vmware on my winbox (with an intel pentium 4).

i installed a 2006.0 bog-standard gentoo, unmasked the new java-stuff (http://www.gentoo.org/proj/en/java/java-upgrade.xml) and emerged freenet.

then i fixed the freenet-sudoers bug and edited /etc/freenet.conf by hand (copied all important entries from the freenet.ebuilt to freenet.conf).

after all the pre-work i started /etc/init.d/freenet with a _very_ mixed feeling...

first nothing really happened - but, alas - 3 mins later - freenet finally runs! i could not believe it!

now i became megalomaniac: i stopped freenet, updated freenet-ext.jar to the latest version and startet it again.

and it still did run like a charm.

i draw the following conclusion: freenet.jar built 5107 does run well on pentium4, but it will not run on an athlon-xp (that's my server's cpu).

that's a f...ing shame as i have only this server   :Embarassed: 

there are 3 ways of handling this: either file a bug report on bugs@freenet or wait for a stable version 0.7 or abandon the use of freenet alltogether.

have to think about it.

@Simius:

i will probably ask for help on freenet mailinglist. but v0.5 is outdated and will not be supported anymore. so there might be a problem.

but i cannot agree with you on the Debian topic: for a stable server running 24/7 Debian is a good thing to install. it's not bleeding edge and has no "schnickschnack" [funky stuff, opposite of no-frills]. so it will run very persistent.

@sternklang:

i'm going to file the bug in the freenet mailinglist first. let's see what they will say about it.

reading your answer i had a specific feeling of listening to Aphex Twin again (i have some songs on my hd, my first experience was Window Liker, but later i listened to others, too). i have to agree with you. there are definite influences in Aphex Twin's music!

can't tell about Tangerine Dream or Kraftwerk (i might be a bit too young   :Razz:   and i grew up with other kinds of music [mostly being gangsta rap, hiphop, quite a bit of techno {influenced by all those kewl Amiga demos, yeah man} and other stuff contributed by my friends]).

until later...

Junyx

----------

