aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Can't start on FreeBSD 6.3  (Read 3061 times)

DLH

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
Can't start on FreeBSD 6.3
« on: January 21, 2009, 10:33:21 PM »

I eventually got around the flex-headaches and managed to compile and install 2.2.3 locally. My joy was short-lived however as on the first run attempt and every one since I get this in terminal:
Code: [Select]
Initialising aMule 2.2.3 using wxGTK2 v2.8.9
Checking if there is an instance already running...
There is an instance of aMule already running
Raising current running instance.
  ...and nothing happens. I don't ever see a muleLock file on this OS and I even tried removing the ~/.aMule dir to see if any settings were a problem, but with the same results. I'm out of clues - please help !
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Can't start on FreeBSD 6.3
« Reply #1 on: January 21, 2009, 10:38:47 PM »

Can you try to create a second user and start aMule with this user? (To see if the lock mechanism has a problem.)
Logged

DLH

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
Re: Can't start on FreeBSD 6.3
« Reply #2 on: January 22, 2009, 12:46:39 AM »

I did - with identical results.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Can't start on FreeBSD 6.3
« Reply #3 on: January 22, 2009, 09:39:24 PM »

Try this patch please:
Code: [Select]
Index: amule.cpp
===================================================================
--- amule.cpp (revision 9393)
+++ amule.cpp (working copy)
@@ -542,9 +542,11 @@
 #else
  AddLogLineMS(false, wxT("Checking if there is an instance already running..."));
 
- m_singleInstance = new wxSingleInstanceChecker(wxT("muleLock"), ConfigDir);
- if (m_singleInstance->IsAnotherRunning()) {
+ m_singleInstance = new wxSingleInstanceChecker();
+ if (m_singleInstance->Create(wxT("muleLock"), ConfigDir)
+ && m_singleInstance->IsAnotherRunning()) {
  AddLogLineMS(true, wxT("There is an instance of aMule already running"));
+ AddLogLineNS(CFormat(wxT("(lock file: %s%s)")) % ConfigDir % wxT("muleLock"));
 
  // This is very tricky. The most secure way to communicate is via ED2K links file
  wxTextFile ed2kFile(ConfigDir + wxT("ED2KLinks"));
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

DLH

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
Re: Can't start on FreeBSD 6.3
« Reply #4 on: January 22, 2009, 11:45:54 PM »

I will try it during the next time window for compiling - it takes a few hours on my ancient PC.
Logged

DLH

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
Re: Can't start on FreeBSD 6.3
« Reply #5 on: January 28, 2009, 10:02:53 PM »

The patch got rejected
Code: [Select]
$ patch < amule.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: amule.cpp
|===================================================================
|--- amule.cpp  (revision 9393)
|+++ amule.cpp  (working copy)
--------------------------
Patching file amule.cpp using Plan A...
Hunk #1 failed at 542.
1 out of 1 hunks failed--saving rejects to amule.cpp.rej
done
I tried inserting the difference by hand, but I don't know what went wrong this time
Code: [Select]
if g++ -DHAVE_CONFIG_H -I. -I. -I..  -DUSE_WX_EXTENSIONS   -I/usr/local/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -DENABLE_IP2COUNTRY=1 -I./libs -Ilibs -I./include -I/usr/local//include -I/usr/local/include -W -Wall -Wshadow -Wundef -O2 -pthread -D_THREAD_SAFE   -MT amule-amule.o -MD -MP -MF ".deps/amule-amule.Tpo" -c -o amule-amule.o `test -f 'amule.cpp' || echo './'`amule.cpp; \
        then mv -f ".deps/amule-amule.Tpo" ".deps/amule-amule.Po"; else rm -f ".deps/amule-amule.Tpo"; exit 1; fi
amule.cpp: In member function `virtual bool CamuleApp::OnInit()':
amule.cpp:542: error: `AddLogLineMS' was not declared in this scope
amule.cpp:548: error: `AddLogLineNS' was not declared in this scope
amule.cpp:548: warning: unused variable 'AddLogLineNS'
gmake[1]: *** [amule-amule.o] Error 1
gmake[1]: Leaving directory `/usr/home/bsdard/aMule-2.2.3/src'
gmake: *** [all-recursive] Error 1
This is the section in question from amule.cpp lines 541-548
Code: [Select]
#else
AddLogLineMS(false, wxT("Checking if there is an instance already running..."))

m_singleInstance = new wxSingleInstanceChecker();
if (m_singleInstance->Create(wxT("muleLock"), ConfigDir)
&& m_singleInstance->IsAnotherRunning()) {
AddLogLineMS(true, wxT("There is an instance of aMule already running"));
AddLogLineNS(CFormat(wxT("(lock file: %s%s)")) % ConfigDir % wxT("muleLock"));
« Last Edit: January 29, 2009, 12:19:59 PM by DLH »
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Can't start on FreeBSD 6.3
« Reply #6 on: January 29, 2009, 03:07:06 PM »

Oops, patch was for SVN version. Try this one:
Code: [Select]
Index: amule.cpp
===================================================================
--- amule.cpp (revision 9402)
+++ amule.cpp (working copy)
@@ -541,9 +541,11 @@
 #else
  printf("Checking if there is an instance already running...\n");
 
- m_singleInstance = new wxSingleInstanceChecker(wxT("muleLock"), ConfigDir);
- if (m_singleInstance->IsAnotherRunning()) {
+ m_singleInstance = new wxSingleInstanceChecker();
+ if (m_singleInstance->Create(wxT("muleLock"), ConfigDir)
+ && m_singleInstance->IsAnotherRunning()) {
  printf("There is an instance of aMule already running\n");
+ printf("%s", (const char*)unicode2UTF8(wxString(CFormat(wxT("(lock file: %s%s)")) % ConfigDir % wxT("muleLock"))));
 
  // This is very tricky. The most secure way to communicate is via ED2K links file
  wxTextFile ed2kFile(ConfigDir + wxT("ED2KLinks"));
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

DLH

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
Re: Can't start on FreeBSD 6.3
« Reply #7 on: January 31, 2009, 12:59:52 AM »

Success at last - big thanks, dude! The trick seems to have worked as 'mule starts up now, although muleLock is still absent and I received this log message:
Code: [Select]
Error: Failed to lock the lock file '/home/bsdard/.aMule/muleLock' (error 22: Invalid argument)
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: Can't start on FreeBSD 6.3
« Reply #8 on: January 31, 2009, 12:55:12 PM »

Does that directory exist? Does it have write permissions for the user you're running aMule with?
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

DLH

  • Jr. Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
Re: Can't start on FreeBSD 6.3
« Reply #9 on: February 01, 2009, 01:03:56 AM »

Quote
Does that directory exist? Does it have write permissions for the user you're running aMule with?
Yes, it's my $HOME and I'm running it as myself.
Logged