
Grazie mille!!!
Moderatore: Staff
Codice: Seleziona tutto
...
algebra.cpp:61:2: error: 'Equal' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
algebra.cpp:61:2: note: declarations in dependent base 'CryptoPP::AbstractGroup<CryptoPP::Integer>' are not found by unqualified lookup
algebra.cpp:61:2: note: use 'this->Equal' instead
...
ma quindi non bastava modificare a mano lo slackBuild senza usare patch?spina ha scritto: In pratica bastava fare tutto quello che ti diceva lui,
Codice: Seleziona tutto
ompiling ClientUDPSocket.cpp
Compiling CorruptionBlackBox.cpp
Compiling DownloadClient.cpp
Compiling DownloadQueue.cpp
In file included from DownloadQueue.h:30:0,
from DownloadQueue.cpp:26:
ObservableQueue.h: In instantiation of 'void CObservableQueue<ValueType>::ObserverAdded(CObservableQueue<ValueType>::ObserverType*) [with ValueType = CPartFile*; CObservableQueue<ValueType>::ObserverType = CObserver<CQueueEvent<CPartFile*> >]':
DownloadQueue.cpp:1528:32: required from here
ObservableQueue.h:334:2: error: 'NotifyObservers' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
ObservableQueue.h:334:2: note: declarations in dependent base 'CObservable<CQueueEvent<CPartFile*> >' are not found by unqualified lookup
ObservableQueue.h:334:2: note: use 'this->NotifyObservers' instead
ObservableQueue.h: In instantiation of 'void CObservableQueue<ValueType>::ObserverRemoved(CObservableQueue<ValueType>::ObserverType*) [with ValueType = CPartFile*; CObservableQueue<ValueType>::ObserverType = CObserver<CQueueEvent<CPartFile*> >]':
DownloadQueue.cpp:1665:1: required from here
ObservableQueue.h:341:2: error: 'NotifyObservers' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
ObservableQueue.h:341:2: note: declarations in dependent base 'CObservable<CQueueEvent<CPartFile*> >' are not found by unqualified lookup
ObservableQueue.h:341:2: note: use 'this->NotifyObservers' instead
make[3]: *** [amule-DownloadQueue.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
bash-4.2#
Codice: Seleziona tutto
#!/bin/sh
# Heavily based on the Slackware 13.37 SlackBuild
# Written by Loris Vicenzi (http://www.slacky.eu)
# Last build from Savino Pio Liguori ( jimmy_page_89 AT hotmail DOT it )
# 21/11/2011 build by alphamanitine ( fabio.testa@tin.it )
# Slackware build script for aMule
# Official Site: http://www.amule.org/
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
set -e
PKGNAME=${PKGNAME:-aMule}
VERSION=${VERSION:-2.3.1}
ARCH=${ARCH:-x86_64}
BUILD=${BUILD:-1}
TAG=${TAG:-sl}
PKGTYPE=${PKGTYPE:-txz}
SOURCE="http://sourceforge.net/projects/amule/files/aMule/2.3.1/${PKGNAME}-${VERSION}.tar.bz2"
CWD=$(pwd)
TMP=${TMP:-/tmp/buildpkgs/$PKGNAME}
PKG=${PKG:-$TMP/package-$PKGNAME}
OUTPUT=${OUTPUT:-$CWD}
TAR=${TAR:-$(basename $SOURCE)}
DIR=${DIR:-$(echo "$TAR"|sed -r 's/(\.tar|)(.gz|.bz2|)$//')}
if [ ! -e $CWD/$TAR ];then
wget $SOURCE
fi
CHOST=i486
if [ $ARCH = i486 ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ $ARCH = i586 ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ $ARCH = i686 ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ $ARCH = x86_64 ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
CHOST=x86_64
fi
rm -rf $TMP
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
tar xvf $CWD/$TAR
cd $DIR
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--libdir=/usr/lib$LIBDIRSUFFIX \
--mandir=/usr/man \
--docdir=/usr/doc/$PKGNAME-$VERSION \
--enable-amule-daemon \
--enable-amulecmd \
--enable-webserver \
--enable-amule-gui \
--enable-cas \
--enable-wxcas \
--enable-ed2k \
--enable-alc \
--enable-alcc \
--enable-xas \
--enable-fileview \
--enable-geoip \
--enable-mmap \
--enable-optimize \
--enable-ccache \
--build=$CHOST-slackware-linux
echo -e "\E[0;32mPress any key to build the package!\E[0;0m"
read
make
make install DESTDIR=$PKG
# Copy documentations
cp -r [A-Z]* docs/*.txt $PKG/usr/doc/$PKGNAME-$VERSION
cat $CWD/$PKGNAME.SlackBuild > $PKG/usr/doc/$PKGNAME-$VERSION/$PKGNAME.SlackBuild
cat $CWD/slack-desc > $PKG/usr/doc/$PKGNAME-$VERSION/slack-desc
if [ -d $PKG/usr/man ]; then
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
)
fi
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs -r strip --strip-unneeded 2> /dev/null || true
)
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
chown -R root:root $PKG
if [ -x "$(which requiredbuilder 2>/dev/null)" ]; then
requiredbuilder -v -y -s $CWD $PKG
fi
/sbin/makepkg -l y -c n $OUTPUT/$PKGNAME-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
if [ "$1" = "--cleanup" ]; then
rm -rf $PKG
fi
Per modificare solo lo slackbuild si dovrebbe vedere quella cosa che dicevo per make. Magari passando qualche opzione a make, questo non fallisce più per questo tipo di errori.Procopio ha scritto:ma quindi non bastava modificare a mano lo slackBuild senza usare patch?spina ha scritto: In pratica bastava fare tutto quello che ti diceva lui,
mmmh ok, ma diff tra cosa e cosa? ho visto la tua patch, ma io non sarei mai in grado di scrivere a mano un file cosìspina ha scritto:Comunque la patch è un file di testo, generato con il comando 'diff'
Codice: Seleziona tutto
bash-4.2# zcat cryptopp561.diff.gz
diff -ur ./algebra.cpp ../cryptopp561/algebra.cpp
--- ./algebra.cpp 2010-08-06 18:44:32.000000000 +0200
+++ ../cryptopp561/algebra.cpp 2012-05-22 21:31:09.712247037 +0200
@@ -58,7 +58,7 @@
Element g[3]={b, a};
unsigned int i0=0, i1=1, i2=2;
- while (!Equal(g[i1], this->Identity()))
+ while (!this->Equal(g[i1], this->Identity()))
{
g[i2] = Mod(g[i0], g[i1]);
unsigned int t = i0; i0 = i1; i1 = i2; i2 = t;
diff -ur ./eccrypto.cpp ../cryptopp561/eccrypto.cpp
--- ./eccrypto.cpp 2010-08-06 18:44:28.000000000 +0200
+++ ../cryptopp561/eccrypto.cpp 2012-05-22 21:31:10.061291398 +0200
@@ -435,7 +435,7 @@
StringSource ssG(param.g, true, new HexDecoder);
Element G;
bool result = GetCurve().DecodePoint(G, ssG, (size_t)ssG.MaxRetrievable());
- SetSubgroupGenerator(G);
+ this->SetSubgroupGenerator(G);
assert(result);
StringSource ssN(param.n, true, new HexDecoder);
@@ -591,7 +591,7 @@
if (level >= 2 && pass)
{
const Integer &q = GetSubgroupOrder();
- Element gq = gpc ? gpc->Exponentiate(this->GetGroupPrecomputation(), q) : ExponentiateElement(g, q);
+ Element gq = gpc ? gpc->Exponentiate(this->GetGroupPrecomputation(), q) : this->ExponentiateElement(g, q);
pass = pass && IsIdentity(gq);
}
return pass;
@@ -629,7 +629,7 @@
typename EC::Point P;
if (!this->GetGroupParameters().GetCurve().DecodePoint(P, bt, size))
BERDecodeError();
- SetPublicElement(P);
+ this->SetPublicElement(P);
}
template <class EC>
diff -ur ./eccrypto.h ../cryptopp561/eccrypto.h
--- ./eccrypto.h 2010-08-06 18:46:24.000000000 +0200
+++ ../cryptopp561/eccrypto.h 2012-05-22 21:31:10.405335124 +0200
@@ -43,7 +43,7 @@
void Initialize(const EllipticCurve &ec, const Point &G, const Integer &n, const Integer &k = Integer::Zero())
{
this->m_groupPrecomputation.SetCurve(ec);
- SetSubgroupGenerator(G);
+ this->SetSubgroupGenerator(G);
m_n = n;
m_k = k;
}
@@ -145,9 +145,9 @@
typedef typename EC::Point Element;
void Initialize(const DL_GroupParameters_EC<EC> ¶ms, const Element &Q)
- {this->AccessGroupParameters() = params; SetPublicElement(Q);}
+ {this->AccessGroupParameters() = params; this->SetPublicElement(Q);}
void Initialize(const EC &ec, const Element &G, const Integer &n, const Element &Q)
- {this->AccessGroupParameters().Initialize(ec, G, n); SetPublicElement(Q);}
+ {this->AccessGroupParameters().Initialize(ec, G, n); this->SetPublicElement(Q);}
// X509PublicKey
void BERDecodePublicKey(BufferedTransformation &bt, bool parametersPresent, size_t size);
@@ -166,9 +166,9 @@
void Initialize(const EC &ec, const Element &G, const Integer &n, const Integer &x)
{this->AccessGroupParameters().Initialize(ec, G, n); this->SetPrivateExponent(x);}
void Initialize(RandomNumberGenerator &rng, const DL_GroupParameters_EC<EC> ¶ms)
- {GenerateRandom(rng, params);}
+ {this->GenerateRandom(rng, params);}
void Initialize(RandomNumberGenerator &rng, const EC &ec, const Element &G, const Integer &n)
- {GenerateRandom(rng, DL_GroupParameters_EC<EC>(ec, G, n));}
+ {this->GenerateRandom(rng, DL_GroupParameters_EC<EC>(ec, G, n));}
// PKCS8PrivateKey
void BERDecodePrivateKey(BufferedTransformation &bt, bool parametersPresent, size_t size);
diff -ur ./panama.cpp ../cryptopp561/panama.cpp
--- ./panama.cpp 2010-08-09 14:22:42.000000000 +0200
+++ ../cryptopp561/panama.cpp 2012-05-22 21:31:11.152430075 +0200
@@ -422,7 +422,7 @@
{
this->ThrowIfInvalidTruncatedSize(size);
- PadLastBlock(this->BLOCKSIZE, 0x01);
+ this->PadLastBlock(this->BLOCKSIZE, 0x01);
HashEndianCorrectedBlock(this->m_data);
diff -ur ./secblock.h ../cryptopp561/secblock.h
--- ./secblock.h 2010-08-06 18:46:20.000000000 +0200
+++ ../cryptopp561/secblock.h 2012-05-22 21:31:11.639491980 +0200
@@ -88,7 +88,7 @@
pointer allocate(size_type n, const void * = NULL)
{
- CheckSize(n);
+ this->CheckSize(n);
if (n == 0)
return NULL;
bash-4.2#
Codice: Seleziona tutto
[...]
inflating: cryptopp-5.6.1/xtr.cpp [text]
inflating: cryptopp-5.6.1/xtr.h [text]
inflating: cryptopp-5.6.1/xtrcrypt.cpp [text]
inflating: cryptopp-5.6.1/xtrcrypt.h [text]
inflating: cryptopp-5.6.1/zdeflate.cpp [text]
inflating: cryptopp-5.6.1/zdeflate.h [text]
inflating: cryptopp-5.6.1/zinflate.cpp [text]
inflating: cryptopp-5.6.1/zinflate.h [text]
inflating: cryptopp-5.6.1/zlib.cpp [text]
inflating: cryptopp-5.6.1/zlib.h [text]
g++ -O2 -fPIC -c hmac.cpp
In file included from hmac.h:7:0,
from hmac.cpp:7:
secblock.h: In instantiation of 'CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned char; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]':
secblock.h:247:19: required from 'CryptoPP::SecBlock<T, A>::SecBlock(CryptoPP::SecBlock<T, A>::size_type) [with T = unsigned char; A = CryptoPP::AllocatorWithCleanup<unsigned char>; CryptoPP::SecBlock<T, A>::size_type = long unsigned int]'
hmac.h:15:38: required from here
secblock.h:91:3: error: 'CheckSize' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
secblock.h:91:3: note: declarations in dependent base 'CryptoPP::AllocatorBase<unsigned char>' are not found by unqualified lookup
secblock.h:91:3: note: use 'this->CheckSize' instead
make: *** [hmac.o] Error 1
Codice: Seleziona tutto
cat > file <<EOF
> ciao
> mamma
> guarda
> come
> non
> mi
> sto
> divertendo
> ad
> usare
> linux
> EOF
Codice: Seleziona tutto
ciao
mamma
guarda
come
mi
diverto
tantissimo
ad
usare
linux
Codice: Seleziona tutto
diff file file.new
5d4
< non
7,8c6,7
< sto
< divertendo
---
> diverto
> tantissimo
Codice: Seleziona tutto
diff -u file file.new
--- file 2012-05-23 17:23:33.021712413 +0200
+++ file.new 2012-05-23 17:09:28.034318860 +0200
@@ -2,10 +2,9 @@
mamma
guarda
come
-non
mi
-sto
-divertendo
+diverto
+tantissimo
ad
usare
linux
Codice: Seleziona tutto
diff -u file file.new > file.diff
Codice: Seleziona tutto
patch < file.diff
patching file file
Codice: Seleziona tutto
diff file file.new
cat file
ciao
mamma
guarda
come
mi
diverto
tantissimo
ad
usare
linux
Codice: Seleziona tutto
diff -u ./file ./file.new > file.diff
Codice: Seleziona tutto
patch -p1 < file.diff
Codice: Seleziona tutto
patch -R < file.diff
patching file file
diff file file.new
5d4
< non
7,8c6,7
< sto
< divertendo
---
> diverto
> tantissimo
bè visto tutto lo sbattone che hai fatto il minimo era che facessi una patch io:)spina ha scritto:Comunque per il tuo problema con amule dovresti vedere di passare al make l'opzione '-fpermissive' così non dovrebbe più darti quegli errori. Setta nello SlackBuild la variabiel CXXFLAGS e CFLAGS anche come '-fpermissive' e prova. Mi sembra più semplice che stare a patchare tutto
Codice: Seleziona tutto
bash-4.2# zcat ObservableQueue.diff.gz
--- ./ObservableQueue.h 2012-05-24 10:32:12.256979233 +0200
+++ ./ObservableQueue.new.h 2012-05-24 10:32:07.924033402 +0200
@@ -331,14 +331,14 @@
template <typename ValueType>
void CObservableQueue<ValueType>::ObserverAdded( ObserverType* o )
{
- NotifyObservers( EventType( EventType::STARTING ), o );
+ this->NotifyObservers( EventType( EventType::STARTING ), o );
}
template <typename ValueType>
void CObservableQueue<ValueType>::ObserverRemoved( ObserverType* o )
{
- NotifyObservers( EventType( EventType::STOPPING ), o );
+ this->NotifyObservers( EventType( EventType::STOPPING ), o );
}
bash-4.2
Codice: Seleziona tutto
zcat $CWD/usr/ObservableQueque.diff.gz | patch -p1
Codice: Seleziona tutto
bash-4.2$ diff -u ./ObservableQueue.h ./ObservableQueue.new.h > ObservableQueue.diff
bash-4.2$ ls
ObservableQueue.diff ObservableQueue.h ObservableQueue.new.h
bash-4.2$ patch -p1 < ObservableQueue.diff
patching file ObservableQueue.h
bash-4.2$ ls
ObservableQueue.diff ObservableQueue.h ObservableQueue.new.h
bash-4.2$ diff ObservableQueue.h ObservableQueue.new.h
bash-4.2$
Codice: Seleziona tutto
diff -u ./src/ObservableQueue.h ./src/ObservableQueue.h.new
Codice: Seleziona tutto
patch -p1
Codice: Seleziona tutto
zcat $CWD/aMule-2.3.1.diff.gz | patch -p1
Codice: Seleziona tutto
bash-4.2$ amuled -f
bash: amuled: command not found
bash-4.2$ amuleweb -w
bash: amuleweb: command not found
bash-4.2$ /usr/bin/amuleweb -w
bash: /usr/bin/amuleweb: No such file or directory
bash-4.2$ ls /usr/bin/am
amarok amarokcollectionscanner amarokpkg amixer amp
amarok_afttagger amarokmp3tunesharmonydaemon amidi amor amule
Codice: Seleziona tutto
bash-4.2$ nano .aMule/
Incoming/ amule.conf.bak cryptkey.dat ipfilter_static.dat lastversion muleLock server.met.bak
Temp/ clients.met emfriends.met known.met logfile preferences.dat shareddir.dat
amule.conf clients.met.bak ipfilter.dat known2_64.met logfile.bak server.met
Procopio ha scritto:ehehehehe infatti:)
sono poi riuscito a fare una patch funzionante, e infatti è identica alla tua;)
...mentre conraid ha postato un link alla stessa patch che abbiamo anche fatto noi, ed un elenco di sorgenti compressi con i files già coretti, quindi senza bisogno di patches?