I have asked this before since december but was ignored everywhere so I am trying to ask this one last time.
I am trying to load an audio file (as an Mix_Chunk) but I am getting the following error message:
"Could not find RIFF or WAVE identifiers (not a Waveform file)"
I tried all export settings in Audacity that I know of, what could I be doing wrong here?
I did everything correctly, I even checked using an hex editor and the identifiers are there.
This issue happens with any file format I try. FOpen was able to read the identifier bytes perfectly too, what could the issue be?
I am using gcc to compile on an Ubuntu machine. I used the package manager to install everything.
The code:
#include <SDL2/SDL.h>
#include <SDL2/SDL_mixer.h>
#include <string>
#include <iostream>
int main() {
int Mixer = Mix_OpenAudio( 44100, MIX_DEFAULT_FORMAT, 2, 2048 );
if(Mixer < 0)
{
std::cout << "Mixer wasn't initialized.";
return 0;
}
if( SDL_Init( SDL_INIT_AUDIO ))
{
std::cout << "Sdl audio wasn't initialized.";
return 0;
}
Mix_Chunk *mc = Mix_LoadWAV("YouGotMail.wav");
if (!mc)
{
std::cout << std::string(std::string("Failed to load audio YouGotMail.wav.\n") + Mix_GetError()).c_str() << std::endl;
return 0;
}
return 0;
}
Using ldd on the executable gives me this output:
linux-vdso.so.1 (0x00007ffe219be000)
libSDL2-2.0.so.0 => /lib/x86_64-linux-gnu/libSDL2-2.0.so.0 (0x00007f569c0eb000)
libSDL2_image-2.0.so.0 => /lib/x86_64-linux-gnu/libSDL2_image-2.0.so.0 (0x00007f569c0c8000)
libSDL_mixer-1.2.so.0 => /lib/x86_64-linux-gnu/libSDL_mixer-1.2.so.0 (0x00007f569c073000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f569be91000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f569be76000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f569bc84000)
libasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x00007f569bb87000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f569ba38000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f569ba32000)
libpulse.so.0 => /lib/x86_64-linux-gnu/libpulse.so.0 (0x00007f569b9dd000)
libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f569b8a0000)
libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007f569b88b000)
libXcursor.so.1 => /lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007f569b87c000)
libXinerama.so.1 => /lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007f569b877000)
libXi.so.6 => /lib/x86_64-linux-gnu/libXi.so.6 (0x00007f569b865000)
libXrandr.so.2 => /lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007f569b858000)
libXss.so.1 => /lib/x86_64-linux-gnu/libXss.so.1 (0x00007f569b853000)
libXxf86vm.so.1 => /lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f569b84c000)
libwayland-egl.so.1 => /lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007f569b845000)
libwayland-client.so.0 => /lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007f569b834000)
libwayland-cursor.so.0 => /lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007f569b829000)
libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f569b7e7000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f569b7c4000)
libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f569b78c000)
libjpeg.so.8 => /lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f569b705000)
libtiff.so.5 => /lib/x86_64-linux-gnu/libtiff.so.5 (0x00007f569b684000)
libwebp.so.6 => /lib/x86_64-linux-gnu/libwebp.so.6 (0x00007f569b61a000)
libSDL-1.2.so.0 => /lib/x86_64-linux-gnu/libSDL-1.2.so.0 (0x00007f569b57e000)
libmikmod.so.3 => /lib/x86_64-linux-gnu/libmikmod.so.3 (0x00007f569b33b000)
libfluidsynth.so.2 => /lib/x86_64-linux-gnu/libfluidsynth.so.2 (0x00007f569b269000)
libvorbisfile.so.3 => /lib/x86_64-linux-gnu/libvorbisfile.so.3 (0x00007f569b25c000)
libFLAC.so.8 => /lib/x86_64-linux-gnu/libFLAC.so.8 (0x00007f569b21e000)
libmad.so.0 => /lib/x86_64-linux-gnu/libmad.so.0 (0x00007f569b1fb000)
/lib64/ld-linux-x86-64.so.2 (0x00007f569c293000)
libpulsecommon-13.99.so => /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-13.99.so (0x00007f569b179000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f569b128000)
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f569b0fc000)
libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f569aef2000)
libXfixes.so.3 => /lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f569aeea000)
libffi.so.7 => /lib/x86_64-linux-gnu/libffi.so.7 (0x00007f569aede000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f569aec2000)
libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f569ae17000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f569adee000)
libjbig.so.0 => /lib/x86_64-linux-gnu/libjbig.so.0 (0x00007f569abe0000)
libpulse-simple.so.0 => /lib/x86_64-linux-gnu/libpulse-simple.so.0 (0x00007f569abd9000)
libcaca.so.0 => /lib/x86_64-linux-gnu/libcaca.so.0 (0x00007f569ab0d000)
libopenal.so.1 => /lib/x86_64-linux-gnu/libopenal.so.1 (0x00007f569aa25000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f569a8fa000)
libgmodule-2.0.so.0 => /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f569a8f4000)
libjack.so.0 => /lib/x86_64-linux-gnu/libjack.so.0 (0x00007f569a8a8000)
libsndfile.so.1 => /lib/x86_64-linux-gnu/libsndfile.so.1 (0x00007f569a82a000)
libreadline.so.8 => /lib/x86_64-linux-gnu/libreadline.so.8 (0x00007f569a7da000)
libinstpatch-1.0.so.2 => /lib/x86_64-linux-gnu/libinstpatch-1.0.so.2 (0x00007f569a71f000)
libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f569a6bd000)
libvorbis.so.0 => /lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007f569a68f000)
libogg.so.0 => /lib/x86_64-linux-gnu/libogg.so.0 (0x00007f569a682000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f569a5d3000)
libwrap.so.0 => /lib/x86_64-linux-gnu/libwrap.so.0 (0x00007f569a5c7000)
libasyncns.so.0 => /lib/x86_64-linux-gnu/libasyncns.so.0 (0x00007f569a3bf000)
libapparmor.so.1 => /lib/x86_64-linux-gnu/libapparmor.so.1 (0x00007f569a3aa000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f569a39f000)
libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f569a399000)
libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f569a391000)
libslang.so.2 => /lib/x86_64-linux-gnu/libslang.so.2 (0x00007f569a09a000)
libncursesw.so.6 => /lib/x86_64-linux-gnu/libncursesw.so.6 (0x00007f569a05e000)
libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007f569a02e000)
libsndio.so.7.0 => /lib/x86_64-linux-gnu/libsndio.so.7.0 (0x00007f569a01d000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f5699faa000)
libvorbisenc.so.2 => /lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007f5699eff000)
liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f5699edc000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f5699dbe000)
libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f5699da1000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f5699d85000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f5699d6b000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f5699d46000)
The problem I was having was that I was linking the old sdl mixer which doesnt work with SDL2, adding lSDL2_mixer library to my make file fixed the error, thank you so much keltar and danadam for pointing this out.
I am trying to use SimpleSAMLphp in AWS ubuntu instance but for some reason I can make it run correctly. I am using AWS-LoadBalancer for https, I do not know if it affect the configuration.
config.php
$config = array(
'baseurlpath' => 'simplesaml/',
'certdir' => 'cert/',
'loggingdir' => 'log/',
'datadir' => 'data/',
'tempdir' => '/tmp/simplesaml',
'technicalcontact_name' => 'David Pacheco',
'technicalcontact_email' => 'dpacheco#lumstons.com',
'timezone' => 'America/Mexico_City',
'secretsalt' => '6ogT+0kPWJAO6FbKThWcI1spujbVVdmFEsPVRiPKEWw=',
'auth.adminpassword' => 'david',
'admin.protectindexpage' => false,
'admin.protectmetadata' => false,
'admin.checkforupdates' => true,
'trusted.url.domains' => array(),
'trusted.url.regex' => false,
'enable.http_post' => false,
'debug' => array(
'saml' => false,
'backtraces' => true,
'validatexml' => false,
),
'showerrors' => true,
'errorreporting' => true,
'logging.level' => SimpleSAML\Logger::NOTICE,
'logging.handler' => 'syslog',
'logging.facility' => defined('LOG_LOCAL5') ? constant('LOG_LOCAL5') : LOG_USER,
'logging.processname' => 'simplesamlphp',
'logging.logfile' => 'simplesamlphp.log',
'statistics.out' => array(
),
'proxy' => null,
'database.dsn' => 'mysql:host=localhost;dbname=saml',
'database.username' => 'simplesamlphp',
'database.password' => 'secret',
'database.options' => array(),
'database.prefix' => '',
'database.persistent' => false,
'database.slaves' => array(
),
'enable.saml20-idp' => false,
'enable.shib13-idp' => false,
'enable.adfs-idp' => false,
'enable.wsfed-sp' => false,
'enable.authmemcookie' => false,
'default-wsfed-idp' => 'urn:federation:pingfederate:localhost',
'shib13.signresponse' => true,
'session.duration' => 8 * (60 * 60),
'session.datastore.timeout' => (4 * 60 * 60),
'session.state.timeout' => (60 * 60),
'session.cookie.name' => 'SimpleSAMLSessionID',
'session.cookie.lifetime' => 0,
'session.cookie.path' => '/',
'session.cookie.domain' => null,
'session.cookie.secure' => false,
'session.phpsession.cookiename' => 'SimpleSAML',
'session.phpsession.savepath' => null,
'session.phpsession.httponly' => true,
'session.authtoken.cookiename' => 'SimpleSAMLAuthToken',
'session.rememberme.enable' => false,
'session.rememberme.checked' => false,
'session.rememberme.lifetime' => (14 * 86400),
'memcache_store.servers' => array(
array(
array('hostname' => 'localhost'),
),
),
'memcache_store.prefix' => '',
'memcache_store.expires' => 36 * (60 * 60),
'language' => array(
'priorities' => array(
'no' => array('nb', 'nn', 'en', 'se'),
'nb' => array('no', 'nn', 'en', 'se'),
'nn' => array('no', 'nb', 'en', 'se'),
'se' => array('nb', 'no', 'nn', 'en'),
),
),
'language.available' => array(
'en', 'no', 'nn', 'se', 'da', 'de', 'sv', 'fi', 'es', 'ca', 'fr', 'it', 'nl', 'lb',
'cs', 'sl', 'lt', 'hr', 'hu', 'pl', 'pt', 'pt-br', 'tr', 'ja', 'zh', 'zh-tw', 'ru',
'et', 'he', 'id', 'sr', 'lv', 'ro', 'eu', 'el', 'af'
),
'language.rtl' => array('ar', 'dv', 'fa', 'ur', 'he'),
'language.default' => 'en',
'language.parameter.name' => 'language',
'language.parameter.setcookie' => true,
'language.cookie.name' => 'language',
'language.cookie.domain' => null,
'language.cookie.path' => '/',
'language.cookie.secure' => false,
'language.cookie.httponly' => false,
'language.cookie.lifetime' => (60 * 60 * 24 * 900),
'language.i18n.backend' => 'SimpleSAMLphp',
'attributes.extradictionary' => null,
'theme.use' => 'default',
'template.auto_reload' => false,
'production' => true,
'idpdisco.enableremember' => true,
'idpdisco.rememberchecked' => true,
'idpdisco.validate' => true,
'idpdisco.extDiscoveryStorage' => null,
'idpdisco.layout' => 'dropdown',
'authproc.idp' => array(
30 => 'core:LanguageAdaptor',
45 => array(
'class' => 'core:StatisticsWithAttribute',
'attributename' => 'realm',
'type' => 'saml20-idp-SSO',
),
50 => 'core:AttributeLimit',
99 => 'core:LanguageAdaptor',
),
'authproc.sp' => array(
90 => 'core:LanguageAdaptor',
),
'metadata.sources' => array(
array('type' => 'flatfile'),
),
'metadata.sign.enable' => false,
'metadata.sign.privatekey' => null,
'metadata.sign.privatekey_pass' => null,
'metadata.sign.certificate' => null,
'metadata.sign.algorithm' => null,
'store.type' => 'phpsession',
'store.sql.dsn' => 'sqlite:/path/to/sqlitedatabase.sq3',
'store.sql.username' => null,
'store.sql.password' => null,
'store.sql.prefix' => 'SimpleSAMLphp',
'store.redis.host' => 'localhost',
'store.redis.port' => 6379,
'store.redis.prefix' => 'SimpleSAMLphp',
);
Apache 2 site config:
<VirtualHost *:80>
ServerName saml.veptec.mx
DocumentRoot /var/www/html
Alias /simplesaml /var/simplesamlphp/www
<Directory /var/simplesamlphp/www>
Require all granted
</Directory>
</VirtualHost>
The https://saml.dominian.com/simplesaml is redirected to https://saml.dominian.com/simplesaml/module.php/core/frontpage_welcome.php but that file return HTTP ERROR 500, I try to track down the error and I fond out that is problem with the config file.
Any ideas?
I found the answer, the location it was not initializing. It was a bug.
In the ./lib/SimpleSAML/Locale/Localization.php file I only call this method:
$this->setupTranslator();
in the end of the constructor and it works correctly.
I made a simple C++ project using Qt, the goal is to extract some connected components from images and save them into proper folders.
I only use one .cpp file and opencv to do so.
But when I run my program I get this error: Symbol lookup error: undefined symbol: _ZN2cv6imreadERKSsi
To be honest I don't understand what's going on. I tried to look on some thread where people had the same issue but nothing worked so far.
I checked with ldd -d -r ./ExctractCC and everything seems to be ok:
linux-vdso.so.1 => (0x00007fffa23c4000)
libopencv_core.so.2.4 => /usr/lib/x86_64-linux-gnu/libopencv_core.so.2.4 (0x00007f3c5522c000)
libopencv_highgui.so.2.4 => /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4 (0x00007f3c54fe3000)
libopencv_imgproc.so.2.4 => /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.2.4 (0x00007f3c54b57000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f3c547d5000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3c544cc000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f3c542b5000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3c53eeb000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f3c53cd1000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3c53ab3000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f3c538ab000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f3c53637000)
libtbb.so.2 => /usr/lib/x86_64-linux-gnu/libtbb.so.2 (0x00007f3c533f9000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f3c531a0000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f3c52f7b000)
libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007f3c52d06000)
libjasper.so.1 => /usr/lib/x86_64-linux-gnu/libjasper.so.1 (0x00007f3c52ab1000)
libIlmImf-2_2.so.22 => /usr/lib/x86_64-linux-gnu/libIlmImf-2_2.so.22 (0x00007f3c525e3000)
libHalf.so.12 => /usr/lib/x86_64-linux-gnu/libHalf.so.12 (0x00007f3c5239f000)
libgtk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 (0x00007f3c51d54000)
libgdk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 (0x00007f3c51a9f000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f3c5184b000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f3c5153a000)
libgtkglext-x11-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgtkglext-x11-1.0.so.0 (0x00007f3c51336000)
libgdkglext-x11-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdkglext-x11-1.0.so.0 (0x00007f3c510d1000)
libdc1394.so.22 => /usr/lib/x86_64-linux-gnu/libdc1394.so.22 (0x00007f3c50e5b000)
libv4l1.so.0 => /usr/lib/x86_64-linux-gnu/libv4l1.so.0 (0x00007f3c50c55000)
libavcodec-ffmpeg.so.56 => /usr/lib/x86_64-linux-gnu/libavcodec-ffmpeg.so.56 (0x00007f3c4f828000)
libavformat-ffmpeg.so.56 => /usr/lib/x86_64-linux-gnu/libavformat-ffmpeg.so.56 (0x00007f3c4f42a000)
libavutil-ffmpeg.so.54 => /usr/lib/x86_64-linux-gnu/libavutil-ffmpeg.so.54 (0x00007f3c4f1bb000)
libswscale-ffmpeg.so.3 => /usr/lib/x86_64-linux-gnu/libswscale-ffmpeg.so.3 (0x00007f3c4ef2b000) /lib64/ld-linux-x86-64.so.2 (0x000055b4ab2ea000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f3c4ed02000)
libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007f3c4eafe000)
libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007f3c4e8fb000)
libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f3c4e6f4000)
libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f3c4e4f0000)
libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f3c4e2c1000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f3c4e0af000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f3c4deab000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f3c4dca5000)
libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f3c4daa3000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f3c4d768000)
libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f3c4d54f000)
libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f3c4d34a000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f3c4d127000)
libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f3c4cf21000)
libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f3c4cd12000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3c4cb0d000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f3c4c8eb000)
libjbig.so.0 => /usr/lib/x86_64-linux-gnu/libjbig.so.0 (0x00007f3c4c6dc000)
libIex-2_2.so.12 => /usr/lib/x86_64-linux-gnu/libIex-2_2.so.12 (0x00007f3c4c4be000)
libIlmThread-2_2.so.12 => /usr/lib/x86_64-linux-gnu/libIlmThread-2_2.so.12 (0x00007f3c4c2b7000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f3c4c0b2000)
libpangocairo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007f3c4bea5000)
libatk-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007f3c4bc80000)
libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2 (0x00007f3c4b96b000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007f3c4b749000)
libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007f3c4b3c1000)
libpangoft2-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007f3c4b1aa000)
libpango-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007f3c4af5e000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f3c4ad1b000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f3c4ab10000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007f3c4a90d000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007f3c4a6fc000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007f3c4a4f1000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007f3c4a2e7000)
libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007f3c4a0e4000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f3c49edb000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f3c49c6b000)
libGLU.so.1 => /usr/lib/x86_64-linux-gnu/libGLU.so.1 (0x00007f3c499fb000)
libXmu.so.6 => /usr/lib/x86_64-linux-gnu/libXmu.so.6 (0x00007f3c497e2000)
libpangox-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangox-1.0.so.0 (0x00007f3c495c2000)
libraw1394.so.11 => /usr/lib/x86_64-linux-gnu/libraw1394.so.11 (0x00007f3c493b2000)
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007f3c4919a000)
libv4l2.so.0 => /usr/lib/x86_64-linux-gnu/libv4l2.so.0 (0x00007f3c48f8c000)
libswresample-ffmpeg.so.1 => /usr/lib/x86_64-linux-gnu/libswresample-ffmpeg.so.1 (0x00007f3c48d6e000)
libva.so.1 => /usr/lib/x86_64-linux-gnu/libva.so.1 (0x00007f3c48b52000)
libzvbi.so.0 => /usr/lib/x86_64-linux-gnu/libzvbi.so.0 (0x00007f3c488c7000)
libxvidcore.so.4 => /usr/lib/x86_64-linux-gnu/libxvidcore.so.4 (0x00007f3c485b2000)
libx265.so.79 => /usr/lib/x86_64-linux-gnu/libx265.so.79 (0x00007f3c47993000)
libx264.so.148 => /usr/lib/x86_64-linux-gnu/libx264.so.148 (0x00007f3c475ef000)
libwebp.so.5 => /usr/lib/x86_64-linux-gnu/libwebp.so.5 (0x00007f3c47392000)
libwavpack.so.1 => /usr/lib/x86_64-linux-gnu/libwavpack.so.1 (0x00007f3c47169000)
libvpx.so.3 => /usr/lib/x86_64-linux-gnu/libvpx.so.3 (0x00007f3c46d45000)
libvorbisenc.so.2 => /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007f3c46a9b000)
libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007f3c4686f000)
libtwolame.so.0 => /usr/lib/x86_64-linux-gnu/libtwolame.so.0 (0x00007f3c4664c000)
libtheoraenc.so.1 => /usr/lib/x86_64-linux-gnu/libtheoraenc.so.1 (0x00007f3c4640c000)
libtheoradec.so.1 => /usr/lib/x86_64-linux-gnu/libtheoradec.so.1 (0x00007f3c461f2000)
libspeex.so.1 => /usr/lib/x86_64-linux-gnu/libspeex.so.1 (0x00007f3c45fd9000)
libsnappy.so.1 => /usr/lib/x86_64-linux-gnu/libsnappy.so.1 (0x00007f3c45dd0000)
libshine.so.3 => /usr/lib/x86_64-linux-gnu/libshine.so.3 (0x00007f3c45bc3000)
libschroedinger-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libschroedinger-1.0.so.0 (0x00007f3c458ee000)
libopus.so.0 => /usr/lib/x86_64-linux-gnu/libopus.so.0 (0x00007f3c456a3000)
libopenjpeg.so.5 => /usr/lib/x86_64-linux-gnu/libopenjpeg.so.5 (0x00007f3c45480000)
libmp3lame.so.0 => /usr/lib/x86_64-linux-gnu/libmp3lame.so.0 (0x00007f3c4520b000)
libgsm.so.1 => /usr/lib/x86_64-linux-gnu/libgsm.so.1 (0x00007f3c44ffc000)
libcrystalhd.so.3 => /usr/lib/x86_64-linux-gnu/libcrystalhd.so.3 (0x00007f3c44de1000)
libssh-gcrypt.so.4 => /usr/lib/x86_64-linux-gnu/libssh-gcrypt.so.4 (0x00007f3c44b97000)
librtmp.so.1 => /usr/lib/x86_64-linux-gnu/librtmp.so.1 (0x00007f3c4497b000)
libmodplug.so.1 => /usr/lib/x86_64-linux-gnu/libmodplug.so.1 (0x00007f3c445f0000)
libgme.so.0 => /usr/lib/x86_64-linux-gnu/libgme.so.0 (0x00007f3c443a1000)
libbluray.so.1 => /usr/lib/x86_64-linux-gnu/libbluray.so.1 (0x00007f3c44158000)
libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f3c43e28000)
libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f3c43c17000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f3c43a13000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f3c4380c000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f3c43562000)
libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007f3c432b9000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f3c430b5000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f3c42eab000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f3c42c88000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f3c42a6d000)
libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f3c4280f000)
libthai.so.0 => /usr/lib/x86_64-linux-gnu/libthai.so.0 (0x00007f3c42605000)
libXt.so.6 => /usr/lib/x86_64-linux-gnu/libXt.so.6 (0x00007f3c4239c000)
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f3c4237b000)
libv4lconvert.so.0 => /usr/lib/x86_64-linux-gnu/libv4lconvert.so.0 (0x00007f3c42101000)
libsoxr.so.0 => /usr/lib/x86_64-linux-gnu/libsoxr.so.0 (0x00007f3c41e9c000)
libnuma.so.1 => /usr/lib/x86_64-linux-gnu/libnuma.so.1 (0x00007f3c41c90000)
libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007f3c41a87000)
liborc-0.4.so.0 => /usr/lib/x86_64-linux-gnu/liborc-0.4.so.0 (0x00007f3c41806000)
libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f3c41525000)
libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f3c412da000)
libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4 (0x00007f3c410a7000)
libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x00007f3c40e71000)
libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f3c40bf0000)
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f3c40835000)
libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f3c405d0000)
libidn.so.11 => /usr/lib/x86_64-linux-gnu/libidn.so.11 (0x00007f3c4039d000)
libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f3c4018a000)
libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f3c3ff64000)
libdatrie.so.1 => /usr/lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007f3c3fd5c000)
libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007f3c3fb53000)
libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007f3c3f939000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007f3c3f717000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f3c3f502000)
libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f3c3f230000)
libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f3c3f000000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f3c3edfc000)
libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f3c3ebf1000)
libicuuc.so.55 => /usr/lib/x86_64-linux-gnu/libicuuc.so.55 (0x00007f3c3e85c000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f3c3e657000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f3c3e453000)
libicudata.so.55 => /usr/lib/x86_64-linux-gnu/libicudata.so.55 (0x00007f3c3c99b000)
undefined symbol:
_ZN2cv7imwriteERKSsRKNS_11_InputArrayERKSt6vectorIiSaIiEE (./ExctractCC) undefined symbol: _ZN2cv6imreadERKSsi (./ExctractCC)
Except for the two undefined symbol at the end.
It seems to be linked with opencv as I can read Imread, but reinstall opencv 2.4 didn't work.
I got the same error with another project which used to work perfectly before I upgrade my Ubuntu from 14.04 to 16.04, the other change I made is to download g++4.9.
I'm not sure if there is a missing library I should install, a compiler issue or something else.
If someone have a hint?
Edit: Here's my code:
#include <iostream>
#include <sys/types.h>
#include <sys/stat.h>
#include <vector>
#include <fstream>
#include <iostream>
#include <algorithm>
#include <math.h>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv/cv.h>
#include <main.h>
#include <processImage.h>
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
using namespace std;
int main()
{
int maxHeight = 2500;
int normHeight = 2000;
int rectangleWidth = round((float)normHeight/200.0);
std::string list_images_train="data/list_images_train";
if(rectangleWidth <3)
{
rectangleWidth = 3;
}
//int numLines = countNumberOfLinesInFIle(list_images_train);
std::vector<std::string> filenames;
std::ifstream fid1(list_images_train.c_str(), std::ios::in);
std::string name;
int x=1;
while(std::getline(fid1,name))
{
filenames.push_back(name);
x+=1;
}
fid1.close();
int n=filenames.size();
for(int x=0;x<n;x++)
{
std::string folder="/home/kamel/TRAVAIL/Romain/build-ExctractCC-Desktop-Debug/"+filenames[x];
int statut=mkdir(folder.c_str(),S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
std::string imageName="data/"+ filenames[x]+".png";
std::string gtFile="data/"+ filenames[x] + ".gt";
//The error occurs here:
cv::Mat imgTest=(cv::imread(imageName.c_str(), CV_LOAD_IMAGE_GRAYSCALE));
double min,max;
imgTest.convertTo(imgTest,CV_64F);
cv::minMaxLoc(imgTest,&min,&max);
imgTest=(255*((imgTest - min)/(max-min)));
imgTest.convertTo(imgTest,CV_8U);
int height=imgTest.rows;
int width=imgTest.cols;
int evaluate=1;
if (gtFile.empty())
{
evaluate=0;
}
double ratio1= (float)maxHeight/ (float)height;
cv::resize(imgTest,imgTest,cv::Size(),ratio1,ratio1,cv::INTER_LANCZOS4);
height=imgTest.rows;
width=imgTest.cols;
cv::Mat binImg;
(cv::GaussianBlur(imgTest,imgTest,cv::Size(7,7),0,0));
imgTest.convertTo(imgTest,CV_8U);
double thrsh= cv::threshold(imgTest,binImg,0,255,CV_THRESH_BINARY_INV |CV_THRESH_OTSU);
std::vector<std::string> vars;
boost::split(vars,imageName, boost::is_any_of("/"),boost::token_compress_on);
cv::Mat binImg0= binImg.clone();
double ratio2= float(normHeight)/float(height);
if(imgTest.cols==0){
std::cout<<"Error reading file"<<std::endl;
}
cv::resize(imgTest,imgTest,cv::Size(),ratio2,ratio2,cv::INTER_LANCZOS4);
height=binImg.rows;
width=binImg.cols;
binImg/=255;
cv::resize(binImg,binImg,cv::Size(),ratio2,ratio2,cv::INTER_LANCZOS4);
cv::Mat imgcontour=binImg.clone();
std::vector<cv::Vec4i> hierarchy;
std::vector<std::vector<cv::Point> > CC;
cv::findContours(imgcontour, CC,hierarchy, CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE, cv::Point(0,0));
int sizeCC=CC.size();
for(int i=0;i<sizeCC;i++)
{
cv::Mat pointsf;
cv::Mat(CC[i]).convertTo(pointsf, CV_32F);
cv::Rect box=cv::boundingRect(pointsf);
cv::Mat tmpimg=binImg.colRange(box.x,box.x+box.width).rowRange(box.y,box.y + box.height);
std::ostringstream name;
name << folder << "/CC"<<i << ".png";
cv::imwrite(name.str(),tmpimg);
}
}
return 0;
}
$cmd = 'runInstances';
$result = $client->$cmd(array(
'ImageId' => selectAMI($_POST['dc'], $_POST['os']),
'MinCount' => 1,
'MaxCount' => 1,
'InstanceType' => $_POST['itype'],
'KeyName' => $_POST['key'],
'SecurityGroups' => array($securityGroupName),
'BlockDeviceMappings' => array(
'DeviceName' => '/dev/sda1',
array(
'Ebs' => array(
'SnapshotId' => 'snap-2337bd2a',
'VolumeSize' => $disksize,
'DeleteOnTermination' => true,
'VolumeType' => 'gp2',
'Encrypted' => false
)
)
)
));
What is wrong with this, it does not work and I get no error?
Your BlockDeviceMappings part is not structured correctly.
You have DeviceName outside the second array structure, where it should be inside.
Try this:
$cmd = 'runInstances';
$result = $client->$cmd(array(
'ImageId' => selectAMI($_POST['dc'], $_POST['os']),
'MinCount' => 1,
'MaxCount' => 1,
'InstanceType' => $_POST['itype'],
'KeyName' => $_POST['key'],
'SecurityGroups' => array($securityGroupName),
'BlockDeviceMappings' => array(
array(
'DeviceName' => '/dev/sda1',
'Ebs' => array(
'SnapshotId' => 'snap-2337bd2a',
'VolumeSize' => $disksize,
'DeleteOnTermination' => true,
'VolumeType' => 'gp2',
'Encrypted' => false
)
)
)
));
Here is my webservice link
http://83.143.26.34/MMWebService/MMWebSrv.asmx?WSDL
I want to call SendTextMessage method through PLSQL. Can Any one help me out?
Here is the plsql code I have used. I am getting timed out exception. But it was fine through SOAP-UI.
declare
l_request soap_api.t_request;
l_response soap_api.t_response;
l_return VARCHAR2(32767);
l_url VARCHAR2(32767);
l_namespace VARCHAR2(32767);
l_method VARCHAR2(32767);
l_soap_action VARCHAR2(32767);
l_result_name VARCHAR2(32767);
BEGIN
l_url := 'http://83.143.26.34:4000/MMWebService/MMWebSrv.asmx';
l_namespace := 'xmlns:ser="urn:MMWebSrvService"';
l_method := 'SendTextMessage';
l_soap_action := l_url || '/' || l_method;
l_result_name := 'return';
l_request := soap_api.new_request(p_method => l_method,
p_namespace => l_namespace);
soap_api.add_parameter(p_request => l_request,
p_name => 'strUsername',
p_type => 'xsd:string',
p_value => 'BIHL');
soap_api.add_parameter(p_request => l_request,
p_name => 'strPassword',
p_type => 'xsd:string',
p_value => 'monday#123');
soap_api.add_parameter(p_request => l_request,
p_name => 'strFrom',
p_type => 'xsd:string',
p_value => 'UserFrom');
soap_api.add_parameter(p_request => l_request,
p_name => 'strTo',
p_type => 'xsd:string',
p_value => '74747574');
soap_api.add_parameter(p_request => l_request,
p_name => 'strMessage',
p_type => 'xsd:string',
p_value => 'UserMsg');
soap_api.add_parameter(p_request => l_request,
p_name => 'strSubject',
p_type => 'xsd:string',
p_value => 'UserSub');
soap_api.add_parameter(p_request => l_request,
p_name => 'strService',
p_type => 'xsd:string',
p_value => 'UserSrv');
soap_api.add_parameter(p_request => l_request,
p_name => 'nOptions',
p_type => 'xsd:int',
p_value => 10);
soap_api.add_parameter(p_request => l_request,
p_name => 'strTimeToSend',
p_type => 'xsd:string',
p_value => sysdate);
soap_api.add_parameter(p_request => l_request,
p_name => 'strReference',
p_type => 'xsd:string',
p_value => 'UserRef');
soap_api.add_parameter(p_request => l_request,
p_name => 'strBillText',
p_type => 'xsd:string',
p_value => 'UserTxt');
soap_api.add_parameter(p_request => l_request,
p_name => 'strSessionID',
p_type => 'xsd:string',
p_value => 'UserSID');
l_response := soap_api.invoke(p_request => l_request,
p_url => l_url,
p_action => l_soap_action);
l_return := soap_api.get_return_value(p_response => l_response,
p_name => l_result_name,
p_namespace => NULL);
EXCEPTION
WHEN OTHERS THEN
pkg_pub_scd_ci.p_log_error('webservice to send a message' || ' -- ' ||
sqlerrm ||
dbms_utility.format_error_backtrace);
end;