Eiffel 18.07 trying to get an ODBC connection running from examples - odbc

Trying to just compile Eiffel_18.07/examples/store/esql/ on Debian 9 I've got following error:
In file included from od243.c:202:0,
from big_file_C8_c.c:42:
/opt/Eiffel_18.07/library/store/dbms/rdbms/odbc/Clib/odbc.h:27:17: fatal error: sql.h: No such file or directory
#include <sql.h>
^
compilation terminated.
Makefile:36: recipe for target 'big_file_C8_c.o' failed
make[1]: *** [big_file_C8_c.o] Error 1
Makefile:72: recipe for target 'C8/Cobj8.o' failed
make: *** [C8/Cobj8.o] Error 2
make: *** Waiting for unfinished jobs....
an apt-get install unixodbc unixodbc-dev odbc-postgresql got me further to
gcc: error: /opt/Eiffel_18.07/library/store/spec/linux-x86-64/lib/libodbc.a: No such file or directory
Makefile:177: recipe for target 'esql' failed
When I try to go to /opt/Eiffel_18.07/library/store/dbms/rdbms/odbc/Clib thinking I'll be able to generate some code to get it working following the /opt/Eiffel_18.07/library/store/install into /opt/Eiffel_18.07/library/store/dbms/rdbms/odbc/Clib trying a sudo /opt/Eiffel_18.07/studio/spec/linux-x86-64/bin/finish_freezing -library
got
cp: cannot stat '/usr/include/eiffelstudio-18.07/config.sh': No such file or directory
Can't find config.sh.
Makefile.SH: 6: .: Can't open ./config.sh
Being a fan of Eiffel, it doesn't seem to be working out of the box and I didn't find enough documentation to get it working :-()

Here is a sequence of steps that allowed me to build the example on Ubuntu 16.04:
Download and unpack EiffelStudio in a new directory (let's denote the absolute path as #ES#).
Set environment variables:
export ISE_EIFFEL=#ES#
export ISE_PLATFORM=linux-x86-64
export PATH=$PATH:$ISE_EIFFEL/studio/spec/$ISE_PLATFORM/bin
These commands assume bash, replace them with equivalents when using another shell.
Install package unixodbc-dev:
sudo apt-get install unixodbc-dev
Compile C code of the Eiffel library store:
cd ${ISE_EIFFEL}/library/store/dbms/rdbms/odbc/Clib
finish_freezing -library
Note: no need to prefix finish_freezing with sudo unless EiffelStudio has been installed to a path without write permissions for ordinary users. Otherwise (e.g., for the original poster of the problem on Debian 9, where EiffelStudio has been installed under /opt), permissions have to be elevated:
sudo -i
cd ${ISE_EIFFEL}/library/store/dbms/rdbms/odbc/Clib
finish_freezing -library
exit
Compile the example esql:
cd ${ISE_EIFFEL}/examples/store/esql
ec -c_compile -config esql.ecf -target esql_odbc
Run the compiled executable:
./EIFGENs/esql_odbc/W_code/esql

Login as root changed my problem instead of only doing a sudo of the finish_freezing command
sudo -i
and then
cd ${ISE_EIFFEL}/library/store/dbms/rdbms/odbc/Clib
finish_freezing -library

Related

I have a error in makefile while running xv6 in ubuntu

i have cloned the xv6-public repository in ubuntu virtual box and i have used the commands
$sudo apt-get install qemu
$git clone https://github.com/mit-pdos/xv6-public.git
$cd xv6-public
$make
$make qemu-nox
when i run make qemu-nox i am getting error like below
***
*** Error: Couldn't find a working QEMU executable.
*** Is the directory containing the qemu binary in your PATH
*** or have you tried setting the QEMU variable in Makefile?
***
nographic -drive file=fs.img,index=1,media=disk,format=raw -drive file=xv6.img,index=0,media=disk,format=raw -smp 2 -m 512
make: nographic: Command not found
make: [Makefile:231: qemu-nox] Error 127 (ignored)
can anyone give any solution for this
I've learned this solution from somebody named Amrollahi.
Try these steps, if your current step works, don't try the rest of it.
one:
make clean
make
make qemu
two:
sudo apt install qemu-system-x86
then repeat step one.
three:
try this link.
four:
you can also try this.

How to install SQLite with Archives extension?

I want to explore the use of SQLite Archive files. I downloaded the amalgamation source code from the downloads page (https://sqlite.org/download.html) and compiled it (gcc shell.c sqlite3.c -lpthread -ldl).
I managed to compile the executable but the Archives option is not there.
Running ./sqlite3 -A shows the error:
./sqlite3: Error: unknown option: -A
Trying to run the .ar command in commandline shows:
Error: unknown command or invalid arguments: "ar". Enter ".help" for help
Running .help also does not show the option for .archive.
How do I install SQLite with the Archives extension?
Compile from source…
$ curl -LO https://www.sqlite.org/src/tarball/sqlite.tar.gz
$ tar xzf sqlite.tar.gz
$ mkdir build
$ cd build
$ ../sqlite/configure
$ make
You will find the executable command line program (sqlite3) in the build directory.
Add compile options by changing the ../sqlite/configure line to something like…
$ ../sqlite/configure CFLAGS='-DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FOREIGN_KEYS=1'
View configure help for more flags like linking additional libraries…
$ ../sqlite/configure --help
Optionally install the headers (sqlite3.h) and libraries (libsqlite3.a, libsqlite3.so, libsqlite3.dylib, etc) by running…
$ make install
Ensure archive support exists…
$ ./sqlite3 -help
...
OPTIONS include:
-A ARGS... run ".archive ARGS" and exit
...
You have to compile it with SQLITE_HAVE_ZLIB defined (And link with -lz).
It's easiest using the autoconf or src source distribution, since the configure script tests for a bunch of things including zlib, and compiles the library and shell with a bunch of useful options that you're not using in your manual compilation of the shell.

Buildroot > 2019.2: How to fix qt5virtualkeyboard install fail?

So I'm trying to upgrade an old buildroot system, from 2018.08.x to the latest release. The issue is that upgrading from 2019.2.x to 2019.5.x or 2019.8.x generates an error while installing qt5virtualkeyboard 5.12.2.
Note: after revision 2019.2.x the Qt kits are updated from 5.11 to 5.12.
I've checked the package install.mk but there are no changes in the related lines:
ifdef QT5VIRTUALKEYBOARD_3RDPARTY_PARTS
define QT5VIRTUALKEYBOARD_INSTALL_TARGET_3RDPARTY_PARTS
cp -dpfr $(STAGING_DIR)/usr/qtvirtualkeyboard $(TARGET_DIR)/usr
endef
endif
and I've already tested that cleaning the qt5virtualkeyboard->language layouts and the qt5virtualkeyboard->handwriting resolve the issue.
Here's the make output from revision 2019.5.x:
qt5virtualkeyboard 5.12.2 Installing to target
mkdir -p /home/fg/work/acto/buildroot/output/target/usr/lib/qt/plugins/platforminputcontexts
cp -dpfr /home/fg/work/acto/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/qt/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so /home/fg/work/acto/buildroot/output/target/usr/lib/qt/plugins/platforminputcontexts
cp -dpf /home/fg/work/acto/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/libQt5VirtualKeyboard*.so.* /home/fg/work/acto/buildroot/output/target/usr/lib
mkdir -p /home/fg/work/acto/buildroot/output/target/usr/qml/QtQuick
cp -dpfr /home/fg/work/acto/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/qml/QtQuick/VirtualKeyboard /home/fg/work/acto/buildroot/output/target/usr/qml/QtQuick/
cp -dpfr /home/fg/work/acto/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/qtvirtualkeyboard /home/fg/work/acto/buildroot/output/target/usr
cp: cannot stat '/home/fg/work/acto/buildroot/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/qtvirtualkeyboard': No such file or directory
package/pkg-generic.mk:331: recipe for target '/home/fg/work/acto/buildroot/output/build/qt5virtualkeyboard-5.12.2/.stamp_target_installed' failed
make: *** [/home/fg/work/acto/buildroot/output/build/qt5virtualkeyboard-5.12.2/.stamp_target_installed] Error 1
At the moment I disabled the virtual keyboard configs to work on the system. But I would like to go deeper: I would like to understand if, during the update process, something went wrong, if I need to add some new dependencies packages or if this might be a package installation error.

UNIX: ./configure is not generating Makefile

I'm trying to install the Apache web server from source code to a Fedora 14 VM. I've run ./configure multiple times already, and can see Makefile.in and .win but no 'Makefile'. When I run the 'make' command, I get the following error:
make: *** No targets specified and no makefile found. Stop.
Can someone please tell me what's keeping it from generating a Makefile?

Error installing libsigsegv on ubuntu

While installing libsigsegv for clisp, I have run into an error. "make install" does not finish correctly. The problem as I can see it is a permission issue. I am very new to Unix and cant figure out how to solve this issue. Can you help me please to solve this issue? Any suggestions highly appreciated.
me#me-VPCSB11FX:~/school/summer/libsigsegv/libsigsegv$ make install
Making install in src
make[1]: Entering directory `/home/me/school/summer/libsigsegv/libsigsegv/src'
make[2]: Entering directory `/home/me/school/summer/libsigsegv/libsigsegv/src'
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
/bin/bash ../libtool --mode=install /usr/bin/install -c 'libsigsegv.la' '/usr/local/lib/libsigsegv.la'
/usr/bin/install -c .libs/libsigsegv.lai /usr/local/lib/libsigsegv.la
/usr/bin/install: cannot create regular file '/usr/local/lib/libsigsegv.la': Permission denied
make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory `/home/me/school/summer/libsigsegv/libsigsegv/src'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/me/school/summer/libsigsegv/libsigsegv/src'
make: *** [install-recursive] Error 1
The installation step is trying to write to a shared directory /usr/local/lib, which is read-only for end users and writable only for administrators and such.
You would need to give yourself additional privilleges by using su or sudo -- see e.g. here.
Also please note that installing custom stuff this way of make install is not very nice nowadays. You should be using some package management system like RPM or Aptitude or whatever, depending on your Unix distribution. It handles uninstallation, dependencies, conflicts, updates and everything else automatically.
The detailed installation instructions are found in the INSTALL or INSTALL.generic file, for every GNU package. For GNU libiconv it is this file: http://git.savannah.gnu.org/gitweb/?p=libsigsegv.git;a=blob;f=INSTALL
The default installation location, /usr/local, is not writable by an ordinary user. You have three options:
Use sudo make install instead of make install.
Make the /usr/local directory and its subdirectory owned by yourself, instead of owned by root: chown -R $(id -u -n) /usr/local
Specify a different installation directory (see section "Installation Names" of said INSTALL file): For example: ./configure --prefix=${HOME}/gnu/arch/$(uname -p)

Resources