aMule Forum
English => aMule Help => Topic started by: DLH 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:
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 !
-
Can you try to create a second user and start aMule with this user? (To see if the lock mechanism has a problem.)
-
I did - with identical results.
-
Try this patch please:
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"));
-
I will try it during the next time window for compiling - it takes a few hours on my ancient PC.
-
The patch got rejected
$ 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 timeif 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#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"));
-
Oops, patch was for SVN version. Try this one:
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"));
-
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:
Error: Failed to lock the lock file '/home/bsdard/.aMule/muleLock' (error 22: Invalid argument)
-
Does that directory exist? Does it have write permissions for the user you're running aMule with?
-
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.