h1

Error invalid SSL_version specified at /usr/share/perl5/IO/Socket/SSL.pm line 332

09/06/2013

Si ejecutando sendEmail ocurre el siguiente error:

pi@raspberrypi ~/egg $ sendemail -f ORIGEN@gmail.com -t DESTINO@gmail.com -s smtp.gmail.com:587 -u "Egg GCP, problema" -m "GCP egg, proceso encontrado muerto" -v -xu ORIGEN -xp CLAVE -o tls=yes
Jun 09 18:57:36 raspberrypi sendemail[6130]: DEBUG => Connecting to smtp.gmail.com:587
Jun 09 18:57:36 raspberrypi sendemail[6130]: DEBUG => My IP address is: 172.26.0.15
Jun 09 18:57:36 raspberrypi sendemail[6130]: SUCCESS => Received: 220 mx.google.com ESMTP k10sm6957405wia.4 - gsmtp
Jun 09 18:57:36 raspberrypi sendemail[6130]: INFO => Sending: EHLO raspberrypi
Jun 09 18:57:36 raspberrypi sendemail[6130]: SUCCESS => Received: 250-mx.google.com at your service, [87.221.224.5], 250-SIZE 35882577, 250-8BITMIME, 250-STARTTLS, 250 ENHANCEDSTATUSCODES
Jun 09 18:57:36 raspberrypi sendemail[6130]: INFO => Sending: STARTTLS
Jun 09 18:57:36 raspberrypi sendemail[6130]: SUCCESS => Received: 220 2.0.0 Ready to start TLS
invalid SSL_version specified at /usr/share/perl5/IO/Socket/SSL.pm line 332

Se soluciona cambiando una línea en el fichero SSL.pm . Para ello, editarlo y realizar el siguiente reemplazo:

pi@raspberrypi ~/egg $ sudo nano  ./usr/share/perl5/IO/Socket/SSL.pm

Localizar la siguiente línea:
m{^(!?)(?:(SSL(?:v2|v3|v23|v2/3))|(TLSv1[12]?))$}i

y sustituirla por:
m{^(!?)(?:(SSL(?:v2|v3|v23|v2/3))|(TLSv1[12]?))}i
 

Fuente: RaspBerry StackExchange

h1

Error /usr/bin/openvt: not found

03/06/2013

If installing a package this error happens:

root@shirley:~# apt-get install gcpegg

Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
Se instalarán los siguientes paquetes NUEVOS:
gcpegg
0 actualizados, 1 se instalarán, 0 para eliminar y 0 no actualizados.
Necesito descargar 41,0kB de archivos.
Se utilizarán 205kB de espacio de disco adicional después de esta operación.
Des:1 http://es.archive.ubuntu.com/ubuntu/ lucid/universe gcpegg 5.1-10 [41,0kB]
Descargados 41,0kB en 0seg. (88,9kB/s)
Seleccionando el paquete gcpegg previamente no seleccionado.
(Leyendo la base de datos ... 00%
183061 ficheros y directorios instalados actualmente.)
Desempaquetando gcpegg (de .../gcpegg_5.1-10_amd64.deb) ...
Procesando disparadores para ureadahead ...
ureadahead will be reprofiled on next reboot
Procesando disparadores para man-db ...
Configurando gcpegg (5.1-10) ...
Starting GCP EGG software on virtual terminal 8: eggsh/etc/init.d/gcpegg: 45: /usr/bin/openvt: not found
invoke-rc.d: initscript gcpegg, action "start" failed.
dpkg: error al procesar gcpegg (--configure):
el subproceso instalado el script post-installation devolvió el código de salida de error 127
Se encontraron errores al procesar:
gcpegg
E: Sub-process /usr/bin/dpkg returned an error code (1)

It is easy to check than the script is looking for a binary in a wrong path. To get the right path:
root@shirley:~# which openvt
/bin/openvt

SOLUTION
Doing a soft link and reinstalling:
root@shirley:~# ln -s /bin/openvt /usr/bin/openvt

root@shirley:~# apt-get install gcpegg
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
gcpegg ya está en su versión más reciente.
0 actualizados, 0 se instalarán, 0 para eliminar y 0 no actualizados.
1 no instalados del todo o eliminados.
Se utilizarán 0B de espacio de disco adicional después de esta operación.
Configurando gcpegg (5.1-10) ...
Starting GCP EGG software on virtual terminal 8: eggsh.

h1

Error curses.h no such file or directory

03/06/2013

Si compilando algún software se produce el siguiente error:
curses.h no such file or directory

Se soluciona instalando las librerías de desarrollo que contienen esa cabecera. En Debian/Ubuntu sería:
sudo apt-get install libncurses5-dev libncursesw5-dev

h1

Error wsdl2java Parameter already exists for method

14/04/2013

Al generar los stubs en Java de un wsdl utilizando Apache-CXF puede ocurrir el siguiente error:

C:\Users\Carlos\Downloads\apache-cxf-2.7.4\apache-cxf-2.7.4\bin>wsdl2java.bat -p
bloomberg https://software.bloomberg.com/datalicensewp/dlws.wsdl

WSDLToJava Error: Parameter: responseId already exists for method submitCancelRe
quest but of type java.util.List instead of java.lang.String.
Use a JAXWS/JAXB binding customization to rename the parameter.

Se soluciona añadiendo el parámetro «-autoNameResolution» a la generación:

C:\Users\Carlos\Downloads\apache-cxf-2.7.4\apache-cxf-2.7.4\bin>wsdl2java.bat -autoNameResolution -p
bloomberg https://software.bloomberg.com/datalicensewp/dlws.wsdl

h1

Errores portando aplicaciones C++ Windows a Solaris (V)

29/12/2012

Al portar una aplicación C++ para Windows desarrollada en Visual Studio hacia Solaris o entornos Unix, se recomienda utilizar las siguientes conversiones y consejos.

EXCEPCIONES

throw std::bad_exception("cAnsiString::ThrowIfOutOfRange. Index is out of range");
Cambiar por:
throw std::runtime_error("cAnsiString::ThrowIfOutOfRange. Index is out of range");

"src/MonteCarlo/cPathCollection.cpp", line 74: Error: Cannot cast from const char* to std::bad_alloc.
Lanzar la excepción sin ningún parámetro.

std::exception
Cambiar por std::runtime_error

VARIOS
headers/ContractPricing/MarketData/cMarketCurve.h:29: error: expected type-specifier before '...' token
Especificar la excepción, generalmente conocida en su cabecera (si no, indicar “Exceptions::cException”)

ParametricImpliedVolatility/cSliceBasedImpliedVolatility.cpp", line 85: Error: The function "lower_bound" must have a prototype.
Declarar la function en el .h

"src/Stock/LogNormal/cBlackScholesEuropeanOptionPricingAnalyticalProblem.cpp", line 27: Error: Utils::DataContainers::cItemDrivenPtrVectorCollection<ContractPricing::Stock::LogNormal::cBlackScholesEuropeanOptionPricingAnalyticalProblem>::Add(ContractPricing::Stock::LogNormal::cBlackScholesEuropeanOptionPricingAnalyticalProblem*) is not accessible from static ContractPricing::Stock::LogNormal::cBlackScholesEuropeanOptionPricingAnalyticalProblem::AddToCollection(const Utils::Memory::cSharedHeapPtr<ContractPricing::Stock::cEuropeanOptionContract, Utils::Memory::cScalarDestroyer, Utils::Synchronization::cFakeSynchronizer>&, ContractPricing::MarketData::cStockImpliedVolatility*, ContractPricing::MarketData::Test::cYieldCurve*, ContractPricing::MarketData::cDividendYieldCurve*, ContractPricing::MarketData::cStockSpotLevel*, Utils::DataContainers::cItemDrivenPtrVectorCollection<ContractPricing::Stock::LogNormal::cBlackScholesEuropeanOptionPricingAnalyticalProblem>*).
Mover de Private a Public el método.

"headers/HestonUtils.h", line 34: Error: The function "OutputDebugString" must have a prototype.
Sustituirlo por un cout.

h1

Errores portando aplicaciones C++ Windows a Solaris (IV)

29/12/2012

Al portar una aplicación C++ para Windows desarrollada en Visual Studio hacia Solaris o entornos Unix, se recomienda utilizar las siguientes conversiones y consejos.

INCLUDES

src/Utils/sEcoCellRange.cpp", line 72: Error: The function "strdup" must have a prototype.
#include <cstring>

Map is not a member of std
#include <map>

size_t len = ::wcslen(wstr); : Error: wcslen is not a member of std.
#include <cwchar>
using std::wcslen;

"../../arguments/arguments.cpp", line 90: Error: The function "find" must have a prototype.
Añadir “using namespace std;”

String is not defined
añadir “using namespace std;”

"src/Utils/strings/StringUtils.cpp", line 20: Error: iswlower is not a member of std.
#include <wctype.h>

Error: size_t is not defined.
#include <stddef.h>

"headers/Utils/Strings/cAnsiString.h", line 187: Error: runtime_error is not a member of std.
#include <stdexcept>

"src/utils/strings/StringUtils.cpp", line 45: Error: The function "iswspace" must have a prototype.
#include  <wctype.h>

"headers/Utils/Math/cholesky.h", line 18: Error: Utils::Math::Cholesky(Utils::DataContainers::cMatrix&, Utils::DataContainers::cVector&) already had a body defined. comprobar que estén los ifndef´s:
#ifndef __CHOLESKY_H__
#define __CHOLESKY_H__
#enfif

"headers/NormDistr2.h", line 21: Error: Multiple declaration for cRandomNumberGenerator.
incluir en el header los ifndef:
#ifndef __NORMDISTR2__
#define __NORMDISTR2__
(…)
#endif

Namespaces cannot be declared in a class scope
comprobar cabecera.

"storage class extern not allowed for a member"
comprobar cabecera.

"../../EcoLibrary3b/src/cXLGreeks.cpp", line 41: Error: ")" expected instead of "&".
ver que esté declarado igual el método tanto en la cabecera como en el src y que los tipos de los parámetros se resuelven.

#ifdef _WIN32
(… código)
#endif

Muchos constructores no se reconocne en el código pese a que vienen en el .h correspondiente. Suele ocurrir que vienen precedidos en el .h de condicionar de que la plataforma sea WIN32. Al portarlo a Solaris u otra plataforma, hay que eliminar esa condición.

h1

Errores portando aplicaciones C++ Windows a Solaris (III)

29/12/2012

Al portar una aplicación C++ para Windows desarrollada en Visual Studio hacia Solaris o entornos Unix, se recomienda utilizar las siguientes conversiones y consejos.

COMPILADOR

"../boost/boost/config/requires_threads.hpp", line 67: Error: #error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt".

boost.threads.solaris
Tal y como indica, añadir en la configuración del proyecto el parámetro «-mt».

headers/ContractPricing/MarketData/cTimeSeriesBumper.h:27: error: expected type-specifier
headers/ContractPricing/MarketData/cTimeSeriesBumper.h:27: error: expected `)'

solaris.sunstudio.g++
Se está compilando con g++ (como se puede ver en la consola). En la configuración global del proyecto, no en la del fichero a compilar, se está especificando utilizar el compilador GNU, en vez de como sería correcto, el de SunStudio 12.1.

Sparc/src/cTimeSeries.o ../Util3/dist/Debug/SunStudio_12.1-Solaris-Sparc/libutil3.a ../Util3/dist/Debug/SunStudio_12.1-Solaris-Sparc/libutil3.a ld: fatal: relocation error: R_SPARC_H44: file ../Util3/dist/Debug/SunStudio_12.1-Solaris-Sparc/libutil3.a(MathUtils.o): symbol .rodata (section): relocations based on the ABS44 coding model can not be used in building a shared object
Compilar las librerías de manera dinámica, no estática, tanto en modo release como debug.

"../../HestonLib/headers/cHestonCalibrator.h", line 102: Error: hola is not a member of const Utils::DataContainers::cItemDrivenPtrVectorCollection.
revisar que el fichero que define esa clase no esté repetido varias veces en el proyecto, de modo que aunque el IDE resuelva al sitio correcto, el compilador no.

Hint try checking whether the first non-inlined, non-pure virtual function of class is defined.
reordenar las librerías incluídas en el linkado para que al linkar no se encuentre con ausencias.

ld: warning: file /lib/sparcv9/libnsl.so: attempted multiple inclusion of file Undefined first referenced symbol in file
quitar.libsnl.so
Quitar libnsl.so

undefined first referenced symbol in file solaris
probar a recompilar la librería que incluye ese método como dinámica.

"symbol referencing errors"
Comprobar que esa función esté definida en el .h y desarrollada en el .cpp

h1

Errores portando aplicaciones C++ Windows a Solaris (II)

28/12/2012

Al portar una aplicación C++ para Windows desarrollada enVisual Studio hacia Solaris o entornos Unix, se recomienda utilizar las siguientes conversiones y consejos.

CONVERSIÓN VISUAL STUDIO A C++

Tipos equivalentes en Visual Studio y Solaris:

_isnan → isnan
__Int64 →  long long
PVOID pvData; → typedef void *PVOID;
__forceinline double CALERF(double ARG, int JINT) → inline
const BSTR ToBSTR() const throw (Exceptions::cException); → typedef char* BSTR;

"src/Utils/strings/cAnsiString.cpp", line 707: Error: The function "_snprintf" must have a prototype.
Sustituir por «snprintf»

"headers/Utils/cVariant.h", line 12: Error: Could not open include file<oaidl.h>
Prescindir de él (comentarlo), definiendo las variables como LPVARIANT en cVariant.h (e incluir esta cabecera en su lugar).

m_variant.bstrVal = ::SysAllocString(str);, SysAllocString is not a member of file level
sustituir por algo equivalente a:
m_variant.bstrVal = _bstr_t bstrt(str);

struct cTypeFunction {
enum Type
{
MIN,
MAX,
MULT,
SUM,
};
};

sustituir por algo equivalente a:

struct cTypeFunction
{
typedef enum
{
MIN,
MAX,
MULT,
SUM
} Type;
};

Conversiones habituales de tipos:
typedef unsigned short WORD;
typedef short BOOL;
typedef void *LPVOID;
typedef const void *LPCVOID;
typedef unsigned char UCHAR;
typedef unsigned char *PUCHAR;
typedef unsigned short USHORT;
typedef int32_t LONG;
typedef uint32_t ULONG;
typedef ULONG *PULONG;
typedef ULONG DWORD;
typedef DWORD *PDWORD;
typedef LONG RESPONSECODE;
typedef char *LPSTR;
typedef const char *LPCSTR;
typedef const BYTE *LPCBYTE;
typedef BYTE *LPBYTE;
typedef DWORD *LPDWORD;
typedef void *PVOID;

h1

Errores portando aplicaciones C++ Windows a Solaris (I)

28/12/2012

Al portar una aplicación C++ para Windows desarrollada enVisual Studio hacia Solaris o entornos Unix, se recomienda utilizar las siguientes conversiones y consejos:

PROGRAMACIÓN

"src/ImpliedVolsCalculation/cHestonPricerUtils.cpp", line 362: Error: Overloading ambiguity between "DateTime::operator+(const DateTime::cDate&, const DateTime::cPeriod&)" and "built-in operator+(long, const wchar_t*)"
Separar la suma en dos líneas.

Error: Could not find a match for Utils::Strings::CaseInsensitiveCompare(char*const, const wchar_t[4]) needed in static ContractPricing::MarketData::cXLCapletBlackVolatilityMatrixBuilder::ReadCapletStrikes(void**const).:if (Utils::Strings::CaseInsensitiveCompare(var[0][k].ToBSTR(), L"ATM"))
Cambiar L”ATM” (formatoUnicode) por ”ATM”

c++ is multiply defined
Probablemente una variable está duplicada en dos ficheros, empezar buscando que el mismo fichero al que referencia el compilador no esté duplicado…

namespaces cannot be declared in a class scope
Mover los inlines que haya declarados fuera de la clase a dentro de la clase, eliminando los namespaces de esos métodos. Y comprobar que la llave que cierra el namespace NO lleve un “;”

cannot have a using directive in a class
Comentar el using.

String is not defined
Añadir “using namespace std;”

c++ +"is not a static data member"
Comprobar los parámetros (los tipos concretamente, que existan) del constructor.

"src/cHestonAnalyticalSolver.cpp", line 86: Error: Too many arguments in call to "std::complex<double>::real() const".
El método .real() no admite parámetros en Solaris, es necesario salvar los resultados de los cálculos en una nueva variable de nombre distinto y devolver esa.

cannot create a variable for abstract class cAutocallSwapEngine
Ver la clase de la que hereda, pues hay algún parámetro que probablemente falte en sus constructores y virtuales.

"../../Include/Heston/HestonPricingInputData.h", line 269: Error: ")" expected instead of "<".
Añadir el espacio de nombres “using namespace std;”

"template vector is not defined"
añadir “using namespace std”;

h1

Joomla, an error occurred while processing this directive, SHTML Wrapper 500 Server Error

26/12/2012

Si al instalar un sitio con Joomla, se produce este error:

[an error occurred while processing this directive]
SHTML Wrapper - 500 Server Error

es necesario activar la extensión FastCGI de PHP. Si se dispone de un host ajeno (Hostmonster, Dreamspace, etc), se puede hacer accediendo al panel de control o contactando con el departamento de soporte.

PHP 5.2 (FastCGI)
All files with the extension .php will be handled by PHP 5.2 FastCGI processes.
FastCGI for PHP makes all your PHP applications run through mod_fastcgi instead of mod_suphp. This eliminates the overhead of loading the PHP interpreter on every hit. Since it is always in memory ready for the next hit, the responses will be generated faster.