I get an error when trying to bundle install - c

gem install mysql2 -v '0.3.21' --source 'https://rubygems.org/'
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
current directory: /home/tatarski/.rvm/gems/ruby-2.3.8/gems/mysql2-0.3.21/ext/mysql2
/usr/share/rvm/rubies/ruby-2.3.8/bin/ruby -I /usr/share/rvm/rubies/ruby-2.3.8/lib/ruby/site_ruby/2.3.0 -r ./siteconf20210223-17291-11rjqor.rb extconf.rb
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Using mysql_config at /usr/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Setting libpath to /usr/lib/x86_64-linux-gnu
-----
creating Makefile
current directory: /home/tatarski/.rvm/gems/ruby-2.3.8/gems/mysql2-0.3.21/ext/mysql2
make "DESTDIR=" clean
current directory: /home/tatarski/.rvm/gems/ruby-2.3.8/gems/mysql2-0.3.21/ext/mysql2
make "DESTDIR="
compiling client.c
client.c: In function 'nogvl_read_query_result':
client.c:439:3: error: unknown type name 'my_bool'
my_bool res = mysql_read_query_result(client);
^
client.c: In function '_mysql_client_options':
client.c:762:3: error: unknown type name 'my_bool'
my_bool boolval;
^
client.c:797:10: error: 'MYSQL_SECURE_AUTH' undeclared (first use in this function)
case MYSQL_SECURE_AUTH:
^
client.c:797:10: note: each undeclared identifier is reported only once for each function it appears in
client.c: In function 'set_secure_auth':
client.c:1185:38: error: 'MYSQL_SECURE_AUTH' undeclared (first use in this function)
return _mysql_client_options(self, MYSQL_SECURE_AUTH, value);
^
client.c:1186:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
make: *** [Makefile:239: client.o] Error 1
make failed, exit code 2
This is the whole error I get.
Does anyone know how to fix this.
The previous threads are old/ the solutions for them didn't work.
I tried:
sudo apt-get install ruby-mysql
and got:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ruby-mysql

https://github.com/brianmario/mysql2
as mentioned here you need to install a few Linx packages first before installing the gem

Related

How can I get Shake to print errors only once?

If I ever have an error during a build, I see it twice
# ghc (for _build/lib/WCLoan.o)
# ghc (for _build/lib/WCLoan.o)
[2 of 2] Compiling WCLoan ( src/WCLoan.hs, _build/lib/WCLoan.o )
src/WCLoan.hs:18:1: error:
Parse error: module header, import declaration
or top-level declaration expected.
|
18 | imAnError
| ^^^^^^^^^
Error when running Shake build system:
* _build/lib/WCLoan.o
user error (Development.Shake.cmd, system command failed
Command: ghc -this-unit-id wcloan-0.0.1 src/WCLoan.hs -outputdir_build/lib -isrc:app:test -dynamic-too -O2 -j12 -fPIC -Werror -Wall -package-name wcloan-0.0.1 '-package base
-4.12.0.0' '-package calc-0.0.1' '-package vector-0.12.0.3'
Exit code: 1
Stderr:
src/WCLoan.hs:18:1: error:
Parse error: module header, import declaration
or top-level declaration expected.
|
18 | imAnError
| ^^^^^^^^^
)
I see that the error occurs during build, then is also shown under the line
Error when running Shake build system:
Is there anything I can do to have it show only once?
The error messages are coming from two distinct locations:
The first one is being printed by a command that Shake runs and writes to stderr with an error message. When you do cmd ... Shake defaults to EchoStderr True (print out the stderr stream to the console), but you can pass EchoStderr False to not echo the stderr.
The second is an exception being bubbled up by Haskell, as a ShakeException, which then gets printed out at the end, and includes the stderr. When you do cmd ... Shake defaults to WithStderr True to include the stderr in the exception, and you can pass WithStderr False to not include the stderr in the exception.
However, because of the way Shake works, you may find that the error message comes out quite a long way before the end of the full Shake command. Therefore, I recommend leaving WithStderr as it is, if you do want to see stderr only once.

How to compile libcurl with ssl by using MinGW

I'm trying to send an email in c. I want to use libcurl for that. But before i need to understand how it's working.
So i download curl-7.63.0.zip and MinGW32.
After installing MinGW, i select all the basic package :
mingw-developper-toolkit-bin
mingw32-base-bin
mingw32-gcc-fortran-bi
mingw32-gcc-g++-bin
mingw32-gcc-objc-bin msys-base-bin
In next, i have extracted all the files to a folder and i run a cmd to write
\>cd "something\curl-7.63.0"
\>mingw32-make mingw32-ssl
But i recieve an error :
\>D:\Projets_Info\Emails\Méthode n°8 Libcurl\drivers\curl-7.63.0>mingw32-make mingw32-ssl
mingw32-make -C lib -f Makefile.m32 CFG=mingw32-ssl
mingw32-make[1]: Entering directory 'D:/Projets_Info/Emails/Méthode n°8
Libcurl/drivers/curl-7.63.0/lib'
Makefile.m32:257: *** Invalid path to OpenSSL package: ../../openssl-1.0.2a. Stop.
mingw32-make[1]: Leaving directory 'D:/Projets_Info/Emails/Méthode n°8 Libcurl/drivers/curl-7.63.0/lib'
Makefile:61: recipe for target 'mingw32-ssl' failed
mingw32-make: *** [mingw32-ssl] Error 2
Does anyone has an idea ? An idea that permit me to have curl with ssl

Compiler error linking objects for remote compiling in visual studio

Currently I run a freenas jail so I can compile my c code, that uses some POSIX functions. The jail is fresh, all I did was enable SSH and 'pkg install gcc'. However I get the following error:
1>Starting remote build
1>Compiling sources:
1>main.c
1>cc1 : warning : command line option '-fthreadsafe-statics' is valid for C++/ObjC++ but not for C
1>cc1 : warning : command line option '-frtti' is valid for C++/ObjC++ but not for C
1>Linking objects
1>/usr/local/lib/gcc6/gcc/x86_64-portbld-freebsd11.1/6.4.0/../../../libstdc++.so : error : undefined reference to `__cxa_thread_atexit_impl#FBSD_1.5'
1>collect2 : error : ld returned 1 exit status
1>Done building project "testingdesktop.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I don't have a clue what's going on, something is missing but I am not sure why.

Compiling perl >5.10 on AIX version 5.3

I've been compiling OpenSSL (and thus Perl >5.10, as it is a dependency) on multiple platforms. I've managed to get 1.1.0b compiled on every single platform except AIX, which I can't even compile Perl. I've tried several versions and looked at the documentation Perl provides online. From what I can tell, it suggests version 5.12.2.
When I attempt to compile version 5.12.2,
I take the following from the documentation, and fill in a few local system variables, such as using XLC rv7.
export OBJECT_MODE=64
./Configure \
-d \
-Dcc=/usr/vac/bin/xlc_r7 \
-Duseshrplib \
-Duse64bitall \
-Dprefix=`pwd`/../PERL
Then I attempt to make as prompted, and get the following error:
/usr/vac/bin/xlc_r7 -q64 -o miniperl -brtl -bdynamic -L/usr/local/lib -b64 gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o miniperlmain.o opmini.o perlmini.o -lbind -lnsl -ldl -lld -lm -lcrypt -lc
LIBPATH=.../perl-5.12.2 ./miniperl -w -Ilib -MExporter -e '<?>' || make minitest
LIBPATH=.../perl-5.12.2 ./miniperl -Ilib autodoc.pl
/usr/bin/ln -s perl5122delta.pod pod/perldelta.pod
LIBPATH=.../perl-5.12.2 ./miniperl -Ilib -Icpan/Cwd -Icpan/Cwd/lib pod/perlmodlib.PL -q
readdir(./../../../../..): Bad file number at lib/FindBin.pm line 116
stat(/pod/): No such file or directory at lib/FindBin.pm line 197
stat(/pod/): No such file or directory at lib/FindBin.pm line 200
Use of chdir('') or chdir(undef) as chdir() is deprecated at pod/perlmodlib.PL line 9.
No such file or directory at pod/perlmodlib.PL line 19.
make: The error code from the last command is 2.
Taking a look at pod/perlmodlib.PL, we see the following:
# MANIFEST itself is Unix style filenames, so we have to assume that Unix style
# filenames will work.
open (MANIFEST, "../MANIFEST") or die $!;
In my desperation I tried to hack it up and avoid writing to the manifest, but then I get this issue:
Creating Makefile.PL in cpan/Archive-Extract for Archive::Extract
Running Makefile.PL in cpan/Archive-Extract
../../miniperl Makefile.PL INSTALLDIRS=perl INSTALLMAN1DIR=none INSTALLMAN3DIR=none PERL_CORE=1 LIBPERL_A=libperl.a
readdir(./../../../../../../..): No such file or directory at ../../lib/File/Find.pm line 610
Use of chdir('') or chdir(undef) as chdir() is deprecated at ../../lib/File/Find.pm line 773.
readdir(./../../..): No such file or directory at ../../cpan/Cwd/lib/File/Spec/Unix.pm line 483
Could not open 'lib/Archive/Extract.pm': No such file or directory at ../../cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm line 2588.
512 from cpan/Archive-Extract's Makefile.PL at make_ext.pl line 390.
Warning: No Makefile!
make: Cannot find a rule to create target config from dependencies.
Stop.
make config PERL_CORE=1 LIBPERL_A=libperl.a failed, continuing anyway...
Making all in cpan/Archive-Extract
make all PERL_CORE=1 LIBPERL_A=libperl.a
make: Cannot find a rule to create target all from dependencies.
Stop.
Unsuccessful make(cpan/Archive-Extract): code=512 at make_ext.pl line 449.
make: The error code from the last command is 2.
The frequency of errors makes me feel like perhaps I don't have something configured right...
My next thought was to try the most updated version, which at the time of writing is 5.24. Using the same configuration and attempting to make I get the following issue:
Can't locate strict.pm in #INC (you may need to install the strict module) (#INC contains: /cpan/AutoLoader/lib /dist/Carp/lib /dist/PathTools /dist/PathTools/lib /cpan/ExtUtils-Install/lib /cpan/ExtUtils-MakeMaker/lib /cpan/ExtUtils-Manifest/lib /cpan/File-Path/lib /ext/re /dist/Term-ReadLine/lib /dist/Exporter/lib /ext/File-Find/lib /cpan/Text-Tabs/lib /dist/constant/lib /cpan/version/lib /lib .) at autodoc.pl line 25.
BEGIN failed--compilation aborted at autodoc.pl line 25.
make: The error code from the last command is 2.
Which I know from other compilations means I need to edit the PERL5LIB variable.
If I keep adding all the modules to the path:
export PERL5LIB=`pwd`/dist/Exporter/lib:$PERL5LIB
export PERL5LIB=`pwd`/cpan/Text-Tabs/lib:$PERL5LIB
export PERL5LIB=`pwd`/ext/re:$PERL5LIB
export PERL5LIB=`pwd`/dist/constant/lib:$PERL5LIB
export PERL5LIB=`pwd`/cpan/ExtUtils-MakeMaker/lib:$PERL5LIB
export PERL5LIB=`pwd`/dist/Carp/lib:$PERL5LIB
export PERL5LIB=`pwd`/cpan/File-Path/lib:$PERL5LIB
export PERL5LIB=`pwd`/dist/PathTools:$PERL5LIB
export PERL5LIB=`pwd`/dist/PathTools/lib:$PERL5LIB
export PERL5LIB=`pwd`/ext/File-Find/lib:$PERL5LIB
Even so, I'll still get an error for a module that isn't even present in the 5.24.0 source!
Can't locate ExtUtils/MakeMaker/version/vpp.pm in #INC (you may need to install the ExtUtils::MakeMaker::version::vpp module) (#INC contains: <removed from post>) at (eval 2) line 2.
BEGIN failed--compilation aborted at (eval 2) line 2.
Compilation failed in require at .../perl-5.24.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm line 10.
BEGIN failed--compilation aborted at .../perl-5.24.0/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MakeMaker.pm line 10.
Compilation failed in require at Makefile.PL line 7.
BEGIN failed--compilation aborted at Makefile.PL line 7.
Unsuccessful Makefile.PL(cpan/Archive-Tar): code=512 at make_ext.pl line 517.
make: The error code from the last command is 2.
I have MakeMaker, but the 5.24 version does not contain vpp.pm! Again, in desperation I attempted to put it in there from a different source, and I get this error:
LIBPATH=.../perl-5.24.0 ./miniperl -Ilib make_ext.pl cpan/Archive-Tar/pm_to_blib MAKE="make" LIBPERL_A=libperl.a
readdir(./../../../../../../..): No such file or directory at .../perl-5.24.0/ext/File-Find/lib/File/Find.pm line 142.
Can't cd to : No such file or directory
Unsuccessful Makefile.PL(cpan/Archive-Tar): code=512 at make_ext.pl line 517.
make: The error code from the last command is 2.
All of this makes me feel like perhaps I'm not configuring something right... Can anyone with some experience help me out with some cut and dry installation instructions for Perl on AIX? I'd be super grateful. Thanks!
Below is some information about my system:
> prtconf
System Model: IBM,8231-E1D
Machine Serial Number: Not Available
Processor Type: Not Available
Processor Implementation Mode: POWER 7
Processor Version: PV_7_Compat
Number Of Processors: 0
Processor Clock Speed: Not Available
CPU Type: 64-bit
Kernel Type: 64-bit
Memory Size: 10240 MB
Good Memory Size: Not Available
Platform Firmware level: Not Available
Firmware Version: IBM,AL770_092
Console Login: disable
Auto Restart: true
Full Core: false
I pull down and compile openssh and openssl frequently. I use gcc and no real magic that I can recall.
Here is my script to build it. I don't know which perl is native to AIX but it seems to work for me.
https://github.com/pedz/aix-build-scripts/blob/master/build-scripts/build-openssl

DTN in OpenEmbedded for BeagleBoard

I'm trying to build the DTN using OpenEmbedded. Unfortunately, DTN
uses Tcl 8.3 or 8.4 and DB 4.2, 4.3, 4.4 or 4.5, but bitbake is using
Tcl 8.5 and DB 5.0.
In the OpenEmbedded recipes directory, among other other files there exists:
db/
db/db_4.3.29.bb
db/db4-native.inc
db/db3-native_3.2.9.bb
db/db_5.0.21.bb
db/db3-3.2.9
db/db4.inc
db/files
db/db-native_4.3.29.bb
db/db3_3.2.9.bb
db/db-native_5.0.21.bb
db/db5.inc
tcltk/
tcltk/tk
tcltk/tk_8.4.19.bb
tcltk/tcl-native_8.4.19.bb
tcltk/tk-8.5.8
tcltk/tk-native_8.4.19.bb
tcltk/tk_8.5.8.bb
tcltk/files
tcltk/tcl
tcltk/tcl-8.5.8
tcltk/tcl_8.5.8.bb
tcltk/tcl_8.4.19.bb `
At some point when the bitbake was configuring the dtn, the following happens:
| checking for library containing pow... -lm
| checking for library containing dlopen... -ldl
|
| configure: checking for tcl installation (version 8.4)
| checking for tcl.h (version 8.4) in /opt/OpenEmbedded/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi usr/include... no
|
| configure: checking for tcl installation (version 8.3)
| checking for tcl.h (version 8.3) in /opt/OpenEmbedded/build/tmp/sysroots/armv7a-angstrom-linux-gnueabi/usr/include... no
| configure: error: can't find usable tcl.h
NOTE: Task failed: /opt/OpenEmbedded/build/tmp/work/armv7a-angstrom-linux-gnueabi/dtn-2.5.0-r5/temp/log.do_configure.27117
ERROR: TaskFailed event exception, aborting
ERROR: Build of /opt/OpenEmbedded/openembedded/recipes/dtnrg/dtn_2.5.0.bb do_configure failed
ERROR: Task 11 (/opt/OpenEmbedded/openembedded/recipes/dtnrg/dtn_2.5.0.bb, do_configure) failed
NOTE: Tasks Summary: Attempted 897 tasks of which 883 didn't need to be rerun and 1 failed.
ERROR: '/opt/OpenEmbedded/openembedded/recipes/dtnrg/dtn_2.5.0.bb' failed `
To solve this I went to the dtn_2.5.0.bb and added --with-tclver=8.5.
The same thing happened with DB and to solve it again I did the same thing.
After a while, when bitbake was compiling the following happened:
| In file included from storage/BerkeleyDBStore.cc:35:
| storage/BerkeleyDBStore.h:31:2: error: #error "must use Berkeley DB major version 4"
| In file included from /opt/OpenEmbedded/build/tmp/sysroots/i686-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../
arm-angstrom-linux-gnueabi/include/c++/4.3.3/ext/hash_set:64,
| from storage/../util/StringUtils.h:39,
| from storage/DurableStore.h:35,
| from storage/BerkeleyDBStore.h:39,
| from storage/BerkeleyDBStore.cc:35:
| /opt/OpenEmbedded/build/tmp/sysroots/i686-linux/usr/armv7a/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/include/c++/4.3.3/backward/backward_warning.h:33:2: warning:
warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date.
Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
| storage/BerkeleyDBStore.cc: In member function 'virtual int oasys::BerkeleyDBStore::init(const oasys::StorageConfig&)':
| storage/BerkeleyDBStore.cc:129: warning: invalid conversion from 'void ()(const char, char*)' to 'void ()(const DB_ENV, const char*, const char*)'
| storage/BerkeleyDBStore.cc:187: error: 'DB_LOG_AUTOREMOVE' was not declared in this scope
| make1: *** [storage/BerkeleyDBStore.o] Error 1
| make1: Leaving directory ``/opt/OpenEmbedded/build/tmp/work/armv7a-angstrom-linux-gnueabi/dtn-2.5.0-r5/dtn-2.5.0/oasys'
| make: * [oasys] Error 2
| FATAL: oe_runmake failed
NOTE: Task failed: /opt/OpenEmbedded/build/tmp/work/armv7a-angstrom-linux-gnueabi/dtn-2.5.0-r5/temp/log.do_compile.5339
ERROR: TaskFailed event exception, aborting
ERROR: Build of /opt/OpenEmbedded/openembedded/recipes/dtnrg/dtn_2.5.0.bb do_compile failed
ERROR: Task 13 (/opt/OpenEmbedded/openembedded/recipes/dtnrg/dtn_2.5.0.bb, do_compile) failed
NOTE: Tasks Summary: Attempted 913 tasks of which 913 didn't need to be rerun and 1 failed.
ERROR: '/opt/OpenEmbedded/openembedded/recipes/dtnrg/dtn_2.5.0.bb' failed `
So, is there any way to 'tell' bitbake or OpenEmbedded to use a version selected by me?
You specify versions of packages in the BOM.

Resources