gtkada-2018 Adacore installation Issue on Ubuntu-18.04.1
I'm installing gtkada-2018 (Adacore) on my Ubuntu 18.04.1 Desktop (clean installed), but it causes libxcb-xlib.so.0 warning while linking.
Would anyone help me to fix this issue?
I installed GNAT Community at first
sudo ./gnat-community-2018-20180528-x86_64-linux-bin
Set directry as /usr/gnat
Here, Ada with GPS work fine.
And next, gtkada-community-community-2018-x86_64-linux-bin
Command is
$sudo ./doinstall
-----long build messages----
Bind
[gprbind] testgtk.bexch
[Ada] testgtk.ali
[gprbind] test_rtree.bexch
[Ada] test_rtree.ali
Link
[link] testgtk.adb
[link] test_rtree.adb
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: **warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so, not found (try using -rpath or -rpath-link)**
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: **warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so, not found (try using -rpath or -rpath-link)**
-----follow long link messages ------
And, the sample program testgtk is not linked and the exec file is not created.
After the installation, when creating a very simple gtkada program with GPS Wizard, and build, then these same message is displayed:
Link [link] main.adb
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so, not
found (try using -rpath or -rpath-link)
[2018-11-15 20:43:28] process terminated successfully, elapsed time: 01.00s
- 100% reproducible above symptom.
- gtkada-2017 did not happen the issue.
ubuntu hyperlink xcb
add a comment |
I'm installing gtkada-2018 (Adacore) on my Ubuntu 18.04.1 Desktop (clean installed), but it causes libxcb-xlib.so.0 warning while linking.
Would anyone help me to fix this issue?
I installed GNAT Community at first
sudo ./gnat-community-2018-20180528-x86_64-linux-bin
Set directry as /usr/gnat
Here, Ada with GPS work fine.
And next, gtkada-community-community-2018-x86_64-linux-bin
Command is
$sudo ./doinstall
-----long build messages----
Bind
[gprbind] testgtk.bexch
[Ada] testgtk.ali
[gprbind] test_rtree.bexch
[Ada] test_rtree.ali
Link
[link] testgtk.adb
[link] test_rtree.adb
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: **warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so, not found (try using -rpath or -rpath-link)**
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: **warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so, not found (try using -rpath or -rpath-link)**
-----follow long link messages ------
And, the sample program testgtk is not linked and the exec file is not created.
After the installation, when creating a very simple gtkada program with GPS Wizard, and build, then these same message is displayed:
Link [link] main.adb
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so, not
found (try using -rpath or -rpath-link)
[2018-11-15 20:43:28] process terminated successfully, elapsed time: 01.00s
- 100% reproducible above symptom.
- gtkada-2017 did not happen the issue.
ubuntu hyperlink xcb
add a comment |
I'm installing gtkada-2018 (Adacore) on my Ubuntu 18.04.1 Desktop (clean installed), but it causes libxcb-xlib.so.0 warning while linking.
Would anyone help me to fix this issue?
I installed GNAT Community at first
sudo ./gnat-community-2018-20180528-x86_64-linux-bin
Set directry as /usr/gnat
Here, Ada with GPS work fine.
And next, gtkada-community-community-2018-x86_64-linux-bin
Command is
$sudo ./doinstall
-----long build messages----
Bind
[gprbind] testgtk.bexch
[Ada] testgtk.ali
[gprbind] test_rtree.bexch
[Ada] test_rtree.ali
Link
[link] testgtk.adb
[link] test_rtree.adb
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: **warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so, not found (try using -rpath or -rpath-link)**
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: **warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so, not found (try using -rpath or -rpath-link)**
-----follow long link messages ------
And, the sample program testgtk is not linked and the exec file is not created.
After the installation, when creating a very simple gtkada program with GPS Wizard, and build, then these same message is displayed:
Link [link] main.adb
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so, not
found (try using -rpath or -rpath-link)
[2018-11-15 20:43:28] process terminated successfully, elapsed time: 01.00s
- 100% reproducible above symptom.
- gtkada-2017 did not happen the issue.
ubuntu hyperlink xcb
I'm installing gtkada-2018 (Adacore) on my Ubuntu 18.04.1 Desktop (clean installed), but it causes libxcb-xlib.so.0 warning while linking.
Would anyone help me to fix this issue?
I installed GNAT Community at first
sudo ./gnat-community-2018-20180528-x86_64-linux-bin
Set directry as /usr/gnat
Here, Ada with GPS work fine.
And next, gtkada-community-community-2018-x86_64-linux-bin
Command is
$sudo ./doinstall
-----long build messages----
Bind
[gprbind] testgtk.bexch
[Ada] testgtk.ali
[gprbind] test_rtree.bexch
[Ada] test_rtree.ali
Link
[link] testgtk.adb
[link] test_rtree.adb
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: **warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so, not found (try using -rpath or -rpath-link)**
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: **warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so, not found (try using -rpath or -rpath-link)**
-----follow long link messages ------
And, the sample program testgtk is not linked and the exec file is not created.
After the installation, when creating a very simple gtkada program with GPS Wizard, and build, then these same message is displayed:
Link [link] main.adb
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld: warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so, not
found (try using -rpath or -rpath-link)
[2018-11-15 20:43:28] process terminated successfully, elapsed time: 01.00s
- 100% reproducible above symptom.
- gtkada-2017 did not happen the issue.
ubuntu hyperlink xcb
ubuntu hyperlink xcb
edited Jan 6 at 4:18
moriy
asked Nov 21 '18 at 7:33
moriymoriy
12
12
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
Thanks, I tried it, but the installation quit early as follows:
- GNAT installation in /usr/gnat/
- This command: sudo apt install libxcb-composite0
Gtkada installaion in /usr/gtkada/ The messages are:
Directory /usr/gtkada does not exist.
Do you want to create it [Y/n] ? y
Are you now ready to proceed with the installation [Y/n] ? y
Copying the Gtk+ binaries
Setting up the environment
Compiling GtkAda
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gprbuild... /usr/bin/gprbuild
checking for gprinstall... /usr/bin/gprinstall
checking that your gnat compiler works with a simple example... Error: no native compiler found for language 'ada', default runtime
conftest.gpr:1:09: no languages defined for this project
gprbuild: "conftest.gpr" processing failed
no
configure: error: /usr/bin/gprbuild test failed at compile time! Check your configuration.
An error occurred. Please see install.log.
I tried GPS and tested Ada with a very simple program, it built and worked as normally.
add a comment |
I deleted /usr/gtkada directory, but libxcb-composite0 remains now.
Re-installed gtkada in the same directory /usr/gnat.
The installation went to the final, but when the sample program testgtk was linking, error happened and the sample's exectable file was not created.
The messages were:
[index] libgtkada_gl.a
Bind
[gprbind] testgtk.bexch
[Ada] testgtk.ali
[gprbind] test_rtree.bexch
[Ada] test_rtree.ali
Link
[link] testgtk.adb
[link] test_rtree.adb
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld:
warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so,
not found (try using -rpath or -rpath-link)
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld:
warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so,
not found (try using -rpath or -rpath-link)
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat
--build-var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static --build-name=static
--sources-subdir=include/gtkada/gtkada.static
--lib-subdir=lib/gtkada/gtkada.static -Psrc/gtkada.gpr
Install project GtkAda - static
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat
--build- var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada
--prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static-pic --build-name=static-pic
--sources-subdir=include/gtkada/gtkada.static-pic
--lib-subdir=lib/gtkada/gtkada.static-pic
-Psrc/gtkada.gpr
Install project GtkAda - static-pic
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat
--build-var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=relocatable --build-name=relocatable
--sources-subdir=include/gtkada/gtkada.relocatable
--lib-subdir=lib/gtkada/gtkada.relocatable
-Psrc/gtkada.gpr
Install project GtkAda - relocatable
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat --build-
var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static
--mode=usage -Psrc/tools/tools.gpr
Install project Tools
cd testgtk; /usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat --build-
var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static
--mode=usage --exec-subdir=/usr/gnat/share/examples/gtkada/testgtk
-Ptestgtk.gpr -aP ../src
Install project TestGtk
GtkAda has now been installed. --
-- To use the library, you may need to update LD_LIBRARY_PATH --
-- or to run ldconfig. You may also need to update GPR_PROJECT_PATH --
-- to include --
-- /usr/gnat/lib/gnat
GtkAda has now been installed on your machine.
You can enter the GtkAda environment by doing:
"/usr/gnat/bin/gtkada-env.sh"
add a comment |
It seems that you miss a package. Try to install:
sudo apt install libxcb-composite0
I'm editing my answer per your new post:
It is probably just a matter of configuration, where GtkAda does not find the Ada compiler. I found this post where it is suggested to run gprbuild with -v , then gprconfig with -v to check the configuration.
One more thing: I understand that you installed GNAT from a downloaded file. Why not trying to install it from Ubuntu repository instead?
~$ sudo apt install libxcb-composite0
– moriy
Nov 21 '18 at 14:33
Thanks, I will try them as you wrote.
– moriy
Nov 22 '18 at 15:55
add a comment |
I found the solution.
I write all the story to install gnat-2018 and gtkada-2018 (Adacore) in Ubuntu 18.04.1 from scratch.
Preparation
#1--#8 are just for my memory.
- Install Ubuntu 18.04.1 from scratch
- Install google-chrome
sudo apt install chromium-browser
sudo apt install synaptic
gsettings set org.gnome.desktop.session idle-delay 1800
sudo apt update
sudo apt upgrade
Reboot OS
sudo apt install make
sudo apt install gcc
sudo apt install gprbuild
sudo apt update
sudo apt upgrade
Now, preparations were done.
GNAT Installation
- Download file from https://www.adacore.com/download/more
Gnat-community-2018-20180528-x86_64-linux-bin
- Set the file executable +x or tick property-permission-Execute in Nautilus.
Execute Gnat-community-2018-20180528-x86_64-linux-bin without sudo
sudo causes a warning in the installation process, then do without sudo in terminal, or just
double-click the file in Nautilus.
Installation directory is required soon, enter e.g. /usr/gnat
- After a few minutes, installation Wizard finishes.
- Set PATH.
e.g.export PATH=/usr/gnat/bin:$PATH
e.g. in ~/.bashrc
Now, GPS works and you can use all of Ada functionalities except gtkada.
- Close Terminal
gtkada Preparation
If you want to install in the same directory, e.g. /usr/gnat, then skip next #21.
- gtkada in another directory
If you want to install gtkada in another directory (e.g. /usr/gtkada), do in Terminal:
sudo visudo
Add the same PATH in the "Default" line as below (e.g. /usr/gnat/bin):
Defaults secure_path="/usr/gnat/bin:/usr/local/sbin:...
To save and quit in
visudo
are tricky, do as follows:^o BS BS BS BS Enter Y Y ^x
Enter to check again to make sure,sudo visudo
, then exit with^x
after the checking.
From next, get the missing file libxcb-xlib-so.0.
The file is not available directly, then get the RPM file which includes it, and convert to the deb file format to install Ubuntu to get it out.
- Go to http://rpm.pbone.net/index.php3/stat/3/limit/9/srodzaj/1/dl/40/search/libxcb.so.1/field/1/field/2
- Find PCLinuxOS and go to the link www.pclinuxos.com/pclinuxos/apt/pclinuxos/64bit/RPMS.x86_64/libxcb-1.12-4pclos2017.x86_64.rpm
- Download ftp.ntua.gr libxcb-1.12-4pclos2017.x86_64.rpm
- Set the file executable:
libxcb-1.12-4pclos2017.x86_64.rpm (159.9kB).
Install alien which can convert the RPM file to the DEB file.
sudo apt install alien
Convert from RPM to DEB
sudo alien libxcb-1.12-4pclos2017.x86_64.rpm
libxcb_1.12-5_amd64.deb was generated.
Now, 2 files are here:
mori@envy:~/Downloads$ls -al lib*
-rwxrwxr-x 1 mori mori 159903 Dec 27 18:12 libxcb-1.12-4pclos2017.x86_64.rpm
-rw-r--r-- 1 root root 152024 Jan 1 12:43 libxcb_1.12-5_amd64.deb
- Install DEB package:
sudo dpkg -i libxcb_1.12-5_amd64.deb
- The target file is created in /usr/lib64 directory (not in /usr/lib)
mori@VB:/usr/lib64$ls -al libxcb-xlib*
lrwxrwxrwx 1 root root 31 Dec 25 16:22 libxcb-xlib.so.0 -> ../../usr/lib64/libxcb.so.1.1.0
lrwxrwxrwx 1 root root 31 Dec 25 16:22 libxcb-xlib.so.0.0.0 -> ../../usr/lib64/libxcb.so.1.1.0
The real file is libxcb.so.1.1.0, and libxcb-xlib.so.0 is just the sym-link.
Now, save only libxcb.so.1.1.0 to another safety place, I used a USB drive.
Uninstall the deb package:
sudo dpkg -r libxcb
Now, you got the missing file, and set the file into the gtkada installer next.
- Download gtkada-2018 (choose the platform and year)
gtkada-community-2018-20180523-x86_64-linux-bin.tar.gz 136.9 MiB May 24 2018 - Set it executable
- Extract file
- Copy the fie libxcb.so.1.1.0 into gtk-bin/lib64 directory:
Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib64 - Set libxcb.so.1.1.0 executable
- Set sym-link
gtk-bin/lib64$sudo ln -s ./libxcb.so.1.1.0 ./libxcb-xlib.so.0
- Check if the sym-link is created
/Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib64$ls -al libxcb*
-rwxr-xr-x 1 mori mori 154424 Aug 16 2017 libxcb.so.1.1.0
lrwxrwxrwx 1 root root 17 Dec 25 22:18 libxcb-xlib.so.0 -> ./libxcb.so.1.1.0 - Copy once more libxcb.so.1.1.0 into gtk-bin/lib directory:
Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib - Set libxcb.so.1.1.0 executable
- Set sym-link
gtk-bin/lib$sudo ln -s ./libxcb.so.1.1.0 ./libxcb-xlib.so.0
- Check if the sym-link is created
/Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib$ls -al libxcb*
-rwxr-xr-x 1 mori mori 154424 Aug 16 2017 libxcb.so.1.1.0
lrwxrwxrwx 1 root root 17 Dec 25 22:18 libxcb-xlib.so.0 -> ./libxcb.so.1.1.0
Now you got prepared all the settings.
gtkada Installation
- Downloads/gtkada-community-community-2018-x86_64-linux-bin$
sudo ./doinstall
Set installation directory /usr/gnat (same) or /usr/gtkada or else.
After a few minutes, installation finishes.
Set gtkada Environments
Do not follow the installer's comments, they are for some other OS's.
Now, the bottom of ~/.bashrc is:
export PATH=/usr/gnat/bin:$PATH
Add one more line like this
. ./gtkada-env.sh
(Note: dot-space-dot)
Create a text file ~/gtkada-env.sh with the following text:
prefix="/usr/gnat"
LD_LIBRARY_PATH_64=$prefix/lib:$LD_LIBRARY_PATH_64
PKG_CONFIG_PATH=$prefix/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
GDK_PIXBUF_MODULE_FILE=$prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
GDK_PIXBUF_MODULEDIR=$prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders/
FONTCONFIG_FILE=/etc/fonts/fonts.conf
XDG_DATA_DIRS=$prefix/share:$XDG_DATA_DIRS
XDG_CONFIG_DIRS=$prefix/etc:$XDG_CONFIG_DIRS
GSETTINGS_BACKEND=memory
GLADE_BASE_DIR=$prefix
GPR_PROJECT_PATH=$prefix/lib/gnat:$GPR_PROJECT_PATH
export LD_LIBRARY_PATH_64
export PKG_CONFIG_PATH
export GDK_PIXBUF_MODULE_FILE
export GDK_PIXBUF_MODULEDIR
export FONTCONFIG_FILE
export XDG_DATA_DIRS
export XDG_CONFIG_DIRS
export GSETTINGS_BACKEND
export GLADE_BASE_DIR
export GPR_PROJECT_PATH
NOTE1: The first line should be changed if you installed into another directory,
e.g. /usr/gtkada then change prefix="/usr/gtkada"
NOTE2: 1/05/2019 FONTCONFIG_FILE was changed.
- Close Terminal
Test Build Functionalities
The easiest way is to use GPS Wizard
- Create a test directory and run gps
- ~/ada/simplegtkada$
gps
- "create new project", "GtkAda", "Simple Window" can make a simple Hello world.
- Build and Run can check the functionality.
- Check if the Terminal application execution doesn't output any errors:
- ~/ada/simplegtkada/obj$
./main
Full build test using testgtk
- Copy all the install files with -a option to another directory.
- ~/Downloads$
cp -a gtkada-community-community-2018-x86_64-linux-bin gtkada-test
- Delete all files in ~/Downloads/gtkada-test/testgtk/obj
- Delete 2 files testgtk and test_rtree in ~/Downloads/gtkada-test/testgtk
- ~/Downloads/gtkada-test/testgtk$
gprbuild
- All testgtk files should be compiled and linked again.
- Try
./testgtk
and check the functionalities. - ~/Downloads/gtkada-test/testgtk$
./testgtk
Known Issue
gedit issue
gedit from Terminal can't startup, though Nautilus can start it up.
The environment settings should affect it, but I couldn't fix it.
Let me know if anyone know the solution.Compiler reference warnings
These warnings are displayed at both static and static-pic compilings, but I think we can ignore them (they did not happen at 2017):
gtkada-canvas_view.ads:590:07: warning: formal parameter "At_Point" is not referenced
gtkada-canvas_view.ads:591:07: warning: formal parameter "Context" is not referenced
gtkada-canvas_view.ads:792:07: warning: formal parameter "Item" is not referenced
gtkada-canvas_view.ads:1984:07: warning: formal parameter "At_Point" is not referenced
gtkada-canvas_view.ads:1985:07: warning: formal parameter "Context" is not referenced
gtkada-canvas_view.ads:1992:07: warning: formal parameter "View" is not referenced
A Benefit of gtkada 2018 Version
It doesn't display the error messages anymore which were usually in 2016 and 2017 versions such as:
Gtk-Message: Failed to load module "unity-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
when starting up GPS and gtkada applications. It makes me feel better.
Your answer requires serious formatting editings. Maybe it is complete but it is unreadable.
– Francesco Boi
Jan 1 at 23:55
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53407208%2fgtkada-2018-adacore-installation-issue-on-ubuntu-18-04-1%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks, I tried it, but the installation quit early as follows:
- GNAT installation in /usr/gnat/
- This command: sudo apt install libxcb-composite0
Gtkada installaion in /usr/gtkada/ The messages are:
Directory /usr/gtkada does not exist.
Do you want to create it [Y/n] ? y
Are you now ready to proceed with the installation [Y/n] ? y
Copying the Gtk+ binaries
Setting up the environment
Compiling GtkAda
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gprbuild... /usr/bin/gprbuild
checking for gprinstall... /usr/bin/gprinstall
checking that your gnat compiler works with a simple example... Error: no native compiler found for language 'ada', default runtime
conftest.gpr:1:09: no languages defined for this project
gprbuild: "conftest.gpr" processing failed
no
configure: error: /usr/bin/gprbuild test failed at compile time! Check your configuration.
An error occurred. Please see install.log.
I tried GPS and tested Ada with a very simple program, it built and worked as normally.
add a comment |
Thanks, I tried it, but the installation quit early as follows:
- GNAT installation in /usr/gnat/
- This command: sudo apt install libxcb-composite0
Gtkada installaion in /usr/gtkada/ The messages are:
Directory /usr/gtkada does not exist.
Do you want to create it [Y/n] ? y
Are you now ready to proceed with the installation [Y/n] ? y
Copying the Gtk+ binaries
Setting up the environment
Compiling GtkAda
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gprbuild... /usr/bin/gprbuild
checking for gprinstall... /usr/bin/gprinstall
checking that your gnat compiler works with a simple example... Error: no native compiler found for language 'ada', default runtime
conftest.gpr:1:09: no languages defined for this project
gprbuild: "conftest.gpr" processing failed
no
configure: error: /usr/bin/gprbuild test failed at compile time! Check your configuration.
An error occurred. Please see install.log.
I tried GPS and tested Ada with a very simple program, it built and worked as normally.
add a comment |
Thanks, I tried it, but the installation quit early as follows:
- GNAT installation in /usr/gnat/
- This command: sudo apt install libxcb-composite0
Gtkada installaion in /usr/gtkada/ The messages are:
Directory /usr/gtkada does not exist.
Do you want to create it [Y/n] ? y
Are you now ready to proceed with the installation [Y/n] ? y
Copying the Gtk+ binaries
Setting up the environment
Compiling GtkAda
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gprbuild... /usr/bin/gprbuild
checking for gprinstall... /usr/bin/gprinstall
checking that your gnat compiler works with a simple example... Error: no native compiler found for language 'ada', default runtime
conftest.gpr:1:09: no languages defined for this project
gprbuild: "conftest.gpr" processing failed
no
configure: error: /usr/bin/gprbuild test failed at compile time! Check your configuration.
An error occurred. Please see install.log.
I tried GPS and tested Ada with a very simple program, it built and worked as normally.
Thanks, I tried it, but the installation quit early as follows:
- GNAT installation in /usr/gnat/
- This command: sudo apt install libxcb-composite0
Gtkada installaion in /usr/gtkada/ The messages are:
Directory /usr/gtkada does not exist.
Do you want to create it [Y/n] ? y
Are you now ready to proceed with the installation [Y/n] ? y
Copying the Gtk+ binaries
Setting up the environment
Compiling GtkAda
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gprbuild... /usr/bin/gprbuild
checking for gprinstall... /usr/bin/gprinstall
checking that your gnat compiler works with a simple example... Error: no native compiler found for language 'ada', default runtime
conftest.gpr:1:09: no languages defined for this project
gprbuild: "conftest.gpr" processing failed
no
configure: error: /usr/bin/gprbuild test failed at compile time! Check your configuration.
An error occurred. Please see install.log.
I tried GPS and tested Ada with a very simple program, it built and worked as normally.
answered Nov 21 '18 at 15:15
moriymoriy
12
12
add a comment |
add a comment |
I deleted /usr/gtkada directory, but libxcb-composite0 remains now.
Re-installed gtkada in the same directory /usr/gnat.
The installation went to the final, but when the sample program testgtk was linking, error happened and the sample's exectable file was not created.
The messages were:
[index] libgtkada_gl.a
Bind
[gprbind] testgtk.bexch
[Ada] testgtk.ali
[gprbind] test_rtree.bexch
[Ada] test_rtree.ali
Link
[link] testgtk.adb
[link] test_rtree.adb
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld:
warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so,
not found (try using -rpath or -rpath-link)
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld:
warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so,
not found (try using -rpath or -rpath-link)
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat
--build-var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static --build-name=static
--sources-subdir=include/gtkada/gtkada.static
--lib-subdir=lib/gtkada/gtkada.static -Psrc/gtkada.gpr
Install project GtkAda - static
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat
--build- var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada
--prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static-pic --build-name=static-pic
--sources-subdir=include/gtkada/gtkada.static-pic
--lib-subdir=lib/gtkada/gtkada.static-pic
-Psrc/gtkada.gpr
Install project GtkAda - static-pic
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat
--build-var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=relocatable --build-name=relocatable
--sources-subdir=include/gtkada/gtkada.relocatable
--lib-subdir=lib/gtkada/gtkada.relocatable
-Psrc/gtkada.gpr
Install project GtkAda - relocatable
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat --build-
var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static
--mode=usage -Psrc/tools/tools.gpr
Install project Tools
cd testgtk; /usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat --build-
var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static
--mode=usage --exec-subdir=/usr/gnat/share/examples/gtkada/testgtk
-Ptestgtk.gpr -aP ../src
Install project TestGtk
GtkAda has now been installed. --
-- To use the library, you may need to update LD_LIBRARY_PATH --
-- or to run ldconfig. You may also need to update GPR_PROJECT_PATH --
-- to include --
-- /usr/gnat/lib/gnat
GtkAda has now been installed on your machine.
You can enter the GtkAda environment by doing:
"/usr/gnat/bin/gtkada-env.sh"
add a comment |
I deleted /usr/gtkada directory, but libxcb-composite0 remains now.
Re-installed gtkada in the same directory /usr/gnat.
The installation went to the final, but when the sample program testgtk was linking, error happened and the sample's exectable file was not created.
The messages were:
[index] libgtkada_gl.a
Bind
[gprbind] testgtk.bexch
[Ada] testgtk.ali
[gprbind] test_rtree.bexch
[Ada] test_rtree.ali
Link
[link] testgtk.adb
[link] test_rtree.adb
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld:
warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so,
not found (try using -rpath or -rpath-link)
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld:
warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so,
not found (try using -rpath or -rpath-link)
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat
--build-var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static --build-name=static
--sources-subdir=include/gtkada/gtkada.static
--lib-subdir=lib/gtkada/gtkada.static -Psrc/gtkada.gpr
Install project GtkAda - static
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat
--build- var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada
--prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static-pic --build-name=static-pic
--sources-subdir=include/gtkada/gtkada.static-pic
--lib-subdir=lib/gtkada/gtkada.static-pic
-Psrc/gtkada.gpr
Install project GtkAda - static-pic
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat
--build-var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=relocatable --build-name=relocatable
--sources-subdir=include/gtkada/gtkada.relocatable
--lib-subdir=lib/gtkada/gtkada.relocatable
-Psrc/gtkada.gpr
Install project GtkAda - relocatable
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat --build-
var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static
--mode=usage -Psrc/tools/tools.gpr
Install project Tools
cd testgtk; /usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat --build-
var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static
--mode=usage --exec-subdir=/usr/gnat/share/examples/gtkada/testgtk
-Ptestgtk.gpr -aP ../src
Install project TestGtk
GtkAda has now been installed. --
-- To use the library, you may need to update LD_LIBRARY_PATH --
-- or to run ldconfig. You may also need to update GPR_PROJECT_PATH --
-- to include --
-- /usr/gnat/lib/gnat
GtkAda has now been installed on your machine.
You can enter the GtkAda environment by doing:
"/usr/gnat/bin/gtkada-env.sh"
add a comment |
I deleted /usr/gtkada directory, but libxcb-composite0 remains now.
Re-installed gtkada in the same directory /usr/gnat.
The installation went to the final, but when the sample program testgtk was linking, error happened and the sample's exectable file was not created.
The messages were:
[index] libgtkada_gl.a
Bind
[gprbind] testgtk.bexch
[Ada] testgtk.ali
[gprbind] test_rtree.bexch
[Ada] test_rtree.ali
Link
[link] testgtk.adb
[link] test_rtree.adb
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld:
warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so,
not found (try using -rpath or -rpath-link)
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld:
warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so,
not found (try using -rpath or -rpath-link)
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat
--build-var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static --build-name=static
--sources-subdir=include/gtkada/gtkada.static
--lib-subdir=lib/gtkada/gtkada.static -Psrc/gtkada.gpr
Install project GtkAda - static
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat
--build- var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada
--prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static-pic --build-name=static-pic
--sources-subdir=include/gtkada/gtkada.static-pic
--lib-subdir=lib/gtkada/gtkada.static-pic
-Psrc/gtkada.gpr
Install project GtkAda - static-pic
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat
--build-var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=relocatable --build-name=relocatable
--sources-subdir=include/gtkada/gtkada.relocatable
--lib-subdir=lib/gtkada/gtkada.relocatable
-Psrc/gtkada.gpr
Install project GtkAda - relocatable
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat --build-
var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static
--mode=usage -Psrc/tools/tools.gpr
Install project Tools
cd testgtk; /usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat --build-
var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static
--mode=usage --exec-subdir=/usr/gnat/share/examples/gtkada/testgtk
-Ptestgtk.gpr -aP ../src
Install project TestGtk
GtkAda has now been installed. --
-- To use the library, you may need to update LD_LIBRARY_PATH --
-- or to run ldconfig. You may also need to update GPR_PROJECT_PATH --
-- to include --
-- /usr/gnat/lib/gnat
GtkAda has now been installed on your machine.
You can enter the GtkAda environment by doing:
"/usr/gnat/bin/gtkada-env.sh"
I deleted /usr/gtkada directory, but libxcb-composite0 remains now.
Re-installed gtkada in the same directory /usr/gnat.
The installation went to the final, but when the sample program testgtk was linking, error happened and the sample's exectable file was not created.
The messages were:
[index] libgtkada_gl.a
Bind
[gprbind] testgtk.bexch
[Ada] testgtk.ali
[gprbind] test_rtree.bexch
[Ada] test_rtree.ali
Link
[link] testgtk.adb
[link] test_rtree.adb
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld:
warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so,
not found (try using -rpath or -rpath-link)
/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.3.1/ld:
warning: libxcb-xlib.so.0, needed by /usr/gnat/lib/libgtk-3.so,
not found (try using -rpath or -rpath-link)
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat
--build-var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static --build-name=static
--sources-subdir=include/gtkada/gtkada.static
--lib-subdir=lib/gtkada/gtkada.static -Psrc/gtkada.gpr
Install project GtkAda - static
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat
--build- var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada
--prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static-pic --build-name=static-pic
--sources-subdir=include/gtkada/gtkada.static-pic
--lib-subdir=lib/gtkada/gtkada.static-pic
-Psrc/gtkada.gpr
Install project GtkAda - static-pic
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat
--build-var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=relocatable --build-name=relocatable
--sources-subdir=include/gtkada/gtkada.relocatable
--lib-subdir=lib/gtkada/gtkada.relocatable
-Psrc/gtkada.gpr
Install project GtkAda - relocatable
/usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat --build-
var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static
--mode=usage -Psrc/tools/tools.gpr
Install project Tools
cd testgtk; /usr/gnat/bin/gprinstall -p -f --project-subdir=lib/gnat --build-
var=GTKADA_BUILD,LIBRARY_TYPE --install-name=gtkada --prefix=/usr/gnat
-XGTK_PREFIX=/usr/gnat -XLIBRARY_TYPE=static
--mode=usage --exec-subdir=/usr/gnat/share/examples/gtkada/testgtk
-Ptestgtk.gpr -aP ../src
Install project TestGtk
GtkAda has now been installed. --
-- To use the library, you may need to update LD_LIBRARY_PATH --
-- or to run ldconfig. You may also need to update GPR_PROJECT_PATH --
-- to include --
-- /usr/gnat/lib/gnat
GtkAda has now been installed on your machine.
You can enter the GtkAda environment by doing:
"/usr/gnat/bin/gtkada-env.sh"
answered Nov 22 '18 at 7:59
moriymoriy
12
12
add a comment |
add a comment |
It seems that you miss a package. Try to install:
sudo apt install libxcb-composite0
I'm editing my answer per your new post:
It is probably just a matter of configuration, where GtkAda does not find the Ada compiler. I found this post where it is suggested to run gprbuild with -v , then gprconfig with -v to check the configuration.
One more thing: I understand that you installed GNAT from a downloaded file. Why not trying to install it from Ubuntu repository instead?
~$ sudo apt install libxcb-composite0
– moriy
Nov 21 '18 at 14:33
Thanks, I will try them as you wrote.
– moriy
Nov 22 '18 at 15:55
add a comment |
It seems that you miss a package. Try to install:
sudo apt install libxcb-composite0
I'm editing my answer per your new post:
It is probably just a matter of configuration, where GtkAda does not find the Ada compiler. I found this post where it is suggested to run gprbuild with -v , then gprconfig with -v to check the configuration.
One more thing: I understand that you installed GNAT from a downloaded file. Why not trying to install it from Ubuntu repository instead?
~$ sudo apt install libxcb-composite0
– moriy
Nov 21 '18 at 14:33
Thanks, I will try them as you wrote.
– moriy
Nov 22 '18 at 15:55
add a comment |
It seems that you miss a package. Try to install:
sudo apt install libxcb-composite0
I'm editing my answer per your new post:
It is probably just a matter of configuration, where GtkAda does not find the Ada compiler. I found this post where it is suggested to run gprbuild with -v , then gprconfig with -v to check the configuration.
One more thing: I understand that you installed GNAT from a downloaded file. Why not trying to install it from Ubuntu repository instead?
It seems that you miss a package. Try to install:
sudo apt install libxcb-composite0
I'm editing my answer per your new post:
It is probably just a matter of configuration, where GtkAda does not find the Ada compiler. I found this post where it is suggested to run gprbuild with -v , then gprconfig with -v to check the configuration.
One more thing: I understand that you installed GNAT from a downloaded file. Why not trying to install it from Ubuntu repository instead?
edited Nov 22 '18 at 8:19
answered Nov 21 '18 at 7:50
FloTFloT
269110
269110
~$ sudo apt install libxcb-composite0
– moriy
Nov 21 '18 at 14:33
Thanks, I will try them as you wrote.
– moriy
Nov 22 '18 at 15:55
add a comment |
~$ sudo apt install libxcb-composite0
– moriy
Nov 21 '18 at 14:33
Thanks, I will try them as you wrote.
– moriy
Nov 22 '18 at 15:55
~$ sudo apt install libxcb-composite0
– moriy
Nov 21 '18 at 14:33
~$ sudo apt install libxcb-composite0
– moriy
Nov 21 '18 at 14:33
Thanks, I will try them as you wrote.
– moriy
Nov 22 '18 at 15:55
Thanks, I will try them as you wrote.
– moriy
Nov 22 '18 at 15:55
add a comment |
I found the solution.
I write all the story to install gnat-2018 and gtkada-2018 (Adacore) in Ubuntu 18.04.1 from scratch.
Preparation
#1--#8 are just for my memory.
- Install Ubuntu 18.04.1 from scratch
- Install google-chrome
sudo apt install chromium-browser
sudo apt install synaptic
gsettings set org.gnome.desktop.session idle-delay 1800
sudo apt update
sudo apt upgrade
Reboot OS
sudo apt install make
sudo apt install gcc
sudo apt install gprbuild
sudo apt update
sudo apt upgrade
Now, preparations were done.
GNAT Installation
- Download file from https://www.adacore.com/download/more
Gnat-community-2018-20180528-x86_64-linux-bin
- Set the file executable +x or tick property-permission-Execute in Nautilus.
Execute Gnat-community-2018-20180528-x86_64-linux-bin without sudo
sudo causes a warning in the installation process, then do without sudo in terminal, or just
double-click the file in Nautilus.
Installation directory is required soon, enter e.g. /usr/gnat
- After a few minutes, installation Wizard finishes.
- Set PATH.
e.g.export PATH=/usr/gnat/bin:$PATH
e.g. in ~/.bashrc
Now, GPS works and you can use all of Ada functionalities except gtkada.
- Close Terminal
gtkada Preparation
If you want to install in the same directory, e.g. /usr/gnat, then skip next #21.
- gtkada in another directory
If you want to install gtkada in another directory (e.g. /usr/gtkada), do in Terminal:
sudo visudo
Add the same PATH in the "Default" line as below (e.g. /usr/gnat/bin):
Defaults secure_path="/usr/gnat/bin:/usr/local/sbin:...
To save and quit in
visudo
are tricky, do as follows:^o BS BS BS BS Enter Y Y ^x
Enter to check again to make sure,sudo visudo
, then exit with^x
after the checking.
From next, get the missing file libxcb-xlib-so.0.
The file is not available directly, then get the RPM file which includes it, and convert to the deb file format to install Ubuntu to get it out.
- Go to http://rpm.pbone.net/index.php3/stat/3/limit/9/srodzaj/1/dl/40/search/libxcb.so.1/field/1/field/2
- Find PCLinuxOS and go to the link www.pclinuxos.com/pclinuxos/apt/pclinuxos/64bit/RPMS.x86_64/libxcb-1.12-4pclos2017.x86_64.rpm
- Download ftp.ntua.gr libxcb-1.12-4pclos2017.x86_64.rpm
- Set the file executable:
libxcb-1.12-4pclos2017.x86_64.rpm (159.9kB).
Install alien which can convert the RPM file to the DEB file.
sudo apt install alien
Convert from RPM to DEB
sudo alien libxcb-1.12-4pclos2017.x86_64.rpm
libxcb_1.12-5_amd64.deb was generated.
Now, 2 files are here:
mori@envy:~/Downloads$ls -al lib*
-rwxrwxr-x 1 mori mori 159903 Dec 27 18:12 libxcb-1.12-4pclos2017.x86_64.rpm
-rw-r--r-- 1 root root 152024 Jan 1 12:43 libxcb_1.12-5_amd64.deb
- Install DEB package:
sudo dpkg -i libxcb_1.12-5_amd64.deb
- The target file is created in /usr/lib64 directory (not in /usr/lib)
mori@VB:/usr/lib64$ls -al libxcb-xlib*
lrwxrwxrwx 1 root root 31 Dec 25 16:22 libxcb-xlib.so.0 -> ../../usr/lib64/libxcb.so.1.1.0
lrwxrwxrwx 1 root root 31 Dec 25 16:22 libxcb-xlib.so.0.0.0 -> ../../usr/lib64/libxcb.so.1.1.0
The real file is libxcb.so.1.1.0, and libxcb-xlib.so.0 is just the sym-link.
Now, save only libxcb.so.1.1.0 to another safety place, I used a USB drive.
Uninstall the deb package:
sudo dpkg -r libxcb
Now, you got the missing file, and set the file into the gtkada installer next.
- Download gtkada-2018 (choose the platform and year)
gtkada-community-2018-20180523-x86_64-linux-bin.tar.gz 136.9 MiB May 24 2018 - Set it executable
- Extract file
- Copy the fie libxcb.so.1.1.0 into gtk-bin/lib64 directory:
Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib64 - Set libxcb.so.1.1.0 executable
- Set sym-link
gtk-bin/lib64$sudo ln -s ./libxcb.so.1.1.0 ./libxcb-xlib.so.0
- Check if the sym-link is created
/Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib64$ls -al libxcb*
-rwxr-xr-x 1 mori mori 154424 Aug 16 2017 libxcb.so.1.1.0
lrwxrwxrwx 1 root root 17 Dec 25 22:18 libxcb-xlib.so.0 -> ./libxcb.so.1.1.0 - Copy once more libxcb.so.1.1.0 into gtk-bin/lib directory:
Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib - Set libxcb.so.1.1.0 executable
- Set sym-link
gtk-bin/lib$sudo ln -s ./libxcb.so.1.1.0 ./libxcb-xlib.so.0
- Check if the sym-link is created
/Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib$ls -al libxcb*
-rwxr-xr-x 1 mori mori 154424 Aug 16 2017 libxcb.so.1.1.0
lrwxrwxrwx 1 root root 17 Dec 25 22:18 libxcb-xlib.so.0 -> ./libxcb.so.1.1.0
Now you got prepared all the settings.
gtkada Installation
- Downloads/gtkada-community-community-2018-x86_64-linux-bin$
sudo ./doinstall
Set installation directory /usr/gnat (same) or /usr/gtkada or else.
After a few minutes, installation finishes.
Set gtkada Environments
Do not follow the installer's comments, they are for some other OS's.
Now, the bottom of ~/.bashrc is:
export PATH=/usr/gnat/bin:$PATH
Add one more line like this
. ./gtkada-env.sh
(Note: dot-space-dot)
Create a text file ~/gtkada-env.sh with the following text:
prefix="/usr/gnat"
LD_LIBRARY_PATH_64=$prefix/lib:$LD_LIBRARY_PATH_64
PKG_CONFIG_PATH=$prefix/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
GDK_PIXBUF_MODULE_FILE=$prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
GDK_PIXBUF_MODULEDIR=$prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders/
FONTCONFIG_FILE=/etc/fonts/fonts.conf
XDG_DATA_DIRS=$prefix/share:$XDG_DATA_DIRS
XDG_CONFIG_DIRS=$prefix/etc:$XDG_CONFIG_DIRS
GSETTINGS_BACKEND=memory
GLADE_BASE_DIR=$prefix
GPR_PROJECT_PATH=$prefix/lib/gnat:$GPR_PROJECT_PATH
export LD_LIBRARY_PATH_64
export PKG_CONFIG_PATH
export GDK_PIXBUF_MODULE_FILE
export GDK_PIXBUF_MODULEDIR
export FONTCONFIG_FILE
export XDG_DATA_DIRS
export XDG_CONFIG_DIRS
export GSETTINGS_BACKEND
export GLADE_BASE_DIR
export GPR_PROJECT_PATH
NOTE1: The first line should be changed if you installed into another directory,
e.g. /usr/gtkada then change prefix="/usr/gtkada"
NOTE2: 1/05/2019 FONTCONFIG_FILE was changed.
- Close Terminal
Test Build Functionalities
The easiest way is to use GPS Wizard
- Create a test directory and run gps
- ~/ada/simplegtkada$
gps
- "create new project", "GtkAda", "Simple Window" can make a simple Hello world.
- Build and Run can check the functionality.
- Check if the Terminal application execution doesn't output any errors:
- ~/ada/simplegtkada/obj$
./main
Full build test using testgtk
- Copy all the install files with -a option to another directory.
- ~/Downloads$
cp -a gtkada-community-community-2018-x86_64-linux-bin gtkada-test
- Delete all files in ~/Downloads/gtkada-test/testgtk/obj
- Delete 2 files testgtk and test_rtree in ~/Downloads/gtkada-test/testgtk
- ~/Downloads/gtkada-test/testgtk$
gprbuild
- All testgtk files should be compiled and linked again.
- Try
./testgtk
and check the functionalities. - ~/Downloads/gtkada-test/testgtk$
./testgtk
Known Issue
gedit issue
gedit from Terminal can't startup, though Nautilus can start it up.
The environment settings should affect it, but I couldn't fix it.
Let me know if anyone know the solution.Compiler reference warnings
These warnings are displayed at both static and static-pic compilings, but I think we can ignore them (they did not happen at 2017):
gtkada-canvas_view.ads:590:07: warning: formal parameter "At_Point" is not referenced
gtkada-canvas_view.ads:591:07: warning: formal parameter "Context" is not referenced
gtkada-canvas_view.ads:792:07: warning: formal parameter "Item" is not referenced
gtkada-canvas_view.ads:1984:07: warning: formal parameter "At_Point" is not referenced
gtkada-canvas_view.ads:1985:07: warning: formal parameter "Context" is not referenced
gtkada-canvas_view.ads:1992:07: warning: formal parameter "View" is not referenced
A Benefit of gtkada 2018 Version
It doesn't display the error messages anymore which were usually in 2016 and 2017 versions such as:
Gtk-Message: Failed to load module "unity-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
when starting up GPS and gtkada applications. It makes me feel better.
Your answer requires serious formatting editings. Maybe it is complete but it is unreadable.
– Francesco Boi
Jan 1 at 23:55
add a comment |
I found the solution.
I write all the story to install gnat-2018 and gtkada-2018 (Adacore) in Ubuntu 18.04.1 from scratch.
Preparation
#1--#8 are just for my memory.
- Install Ubuntu 18.04.1 from scratch
- Install google-chrome
sudo apt install chromium-browser
sudo apt install synaptic
gsettings set org.gnome.desktop.session idle-delay 1800
sudo apt update
sudo apt upgrade
Reboot OS
sudo apt install make
sudo apt install gcc
sudo apt install gprbuild
sudo apt update
sudo apt upgrade
Now, preparations were done.
GNAT Installation
- Download file from https://www.adacore.com/download/more
Gnat-community-2018-20180528-x86_64-linux-bin
- Set the file executable +x or tick property-permission-Execute in Nautilus.
Execute Gnat-community-2018-20180528-x86_64-linux-bin without sudo
sudo causes a warning in the installation process, then do without sudo in terminal, or just
double-click the file in Nautilus.
Installation directory is required soon, enter e.g. /usr/gnat
- After a few minutes, installation Wizard finishes.
- Set PATH.
e.g.export PATH=/usr/gnat/bin:$PATH
e.g. in ~/.bashrc
Now, GPS works and you can use all of Ada functionalities except gtkada.
- Close Terminal
gtkada Preparation
If you want to install in the same directory, e.g. /usr/gnat, then skip next #21.
- gtkada in another directory
If you want to install gtkada in another directory (e.g. /usr/gtkada), do in Terminal:
sudo visudo
Add the same PATH in the "Default" line as below (e.g. /usr/gnat/bin):
Defaults secure_path="/usr/gnat/bin:/usr/local/sbin:...
To save and quit in
visudo
are tricky, do as follows:^o BS BS BS BS Enter Y Y ^x
Enter to check again to make sure,sudo visudo
, then exit with^x
after the checking.
From next, get the missing file libxcb-xlib-so.0.
The file is not available directly, then get the RPM file which includes it, and convert to the deb file format to install Ubuntu to get it out.
- Go to http://rpm.pbone.net/index.php3/stat/3/limit/9/srodzaj/1/dl/40/search/libxcb.so.1/field/1/field/2
- Find PCLinuxOS and go to the link www.pclinuxos.com/pclinuxos/apt/pclinuxos/64bit/RPMS.x86_64/libxcb-1.12-4pclos2017.x86_64.rpm
- Download ftp.ntua.gr libxcb-1.12-4pclos2017.x86_64.rpm
- Set the file executable:
libxcb-1.12-4pclos2017.x86_64.rpm (159.9kB).
Install alien which can convert the RPM file to the DEB file.
sudo apt install alien
Convert from RPM to DEB
sudo alien libxcb-1.12-4pclos2017.x86_64.rpm
libxcb_1.12-5_amd64.deb was generated.
Now, 2 files are here:
mori@envy:~/Downloads$ls -al lib*
-rwxrwxr-x 1 mori mori 159903 Dec 27 18:12 libxcb-1.12-4pclos2017.x86_64.rpm
-rw-r--r-- 1 root root 152024 Jan 1 12:43 libxcb_1.12-5_amd64.deb
- Install DEB package:
sudo dpkg -i libxcb_1.12-5_amd64.deb
- The target file is created in /usr/lib64 directory (not in /usr/lib)
mori@VB:/usr/lib64$ls -al libxcb-xlib*
lrwxrwxrwx 1 root root 31 Dec 25 16:22 libxcb-xlib.so.0 -> ../../usr/lib64/libxcb.so.1.1.0
lrwxrwxrwx 1 root root 31 Dec 25 16:22 libxcb-xlib.so.0.0.0 -> ../../usr/lib64/libxcb.so.1.1.0
The real file is libxcb.so.1.1.0, and libxcb-xlib.so.0 is just the sym-link.
Now, save only libxcb.so.1.1.0 to another safety place, I used a USB drive.
Uninstall the deb package:
sudo dpkg -r libxcb
Now, you got the missing file, and set the file into the gtkada installer next.
- Download gtkada-2018 (choose the platform and year)
gtkada-community-2018-20180523-x86_64-linux-bin.tar.gz 136.9 MiB May 24 2018 - Set it executable
- Extract file
- Copy the fie libxcb.so.1.1.0 into gtk-bin/lib64 directory:
Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib64 - Set libxcb.so.1.1.0 executable
- Set sym-link
gtk-bin/lib64$sudo ln -s ./libxcb.so.1.1.0 ./libxcb-xlib.so.0
- Check if the sym-link is created
/Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib64$ls -al libxcb*
-rwxr-xr-x 1 mori mori 154424 Aug 16 2017 libxcb.so.1.1.0
lrwxrwxrwx 1 root root 17 Dec 25 22:18 libxcb-xlib.so.0 -> ./libxcb.so.1.1.0 - Copy once more libxcb.so.1.1.0 into gtk-bin/lib directory:
Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib - Set libxcb.so.1.1.0 executable
- Set sym-link
gtk-bin/lib$sudo ln -s ./libxcb.so.1.1.0 ./libxcb-xlib.so.0
- Check if the sym-link is created
/Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib$ls -al libxcb*
-rwxr-xr-x 1 mori mori 154424 Aug 16 2017 libxcb.so.1.1.0
lrwxrwxrwx 1 root root 17 Dec 25 22:18 libxcb-xlib.so.0 -> ./libxcb.so.1.1.0
Now you got prepared all the settings.
gtkada Installation
- Downloads/gtkada-community-community-2018-x86_64-linux-bin$
sudo ./doinstall
Set installation directory /usr/gnat (same) or /usr/gtkada or else.
After a few minutes, installation finishes.
Set gtkada Environments
Do not follow the installer's comments, they are for some other OS's.
Now, the bottom of ~/.bashrc is:
export PATH=/usr/gnat/bin:$PATH
Add one more line like this
. ./gtkada-env.sh
(Note: dot-space-dot)
Create a text file ~/gtkada-env.sh with the following text:
prefix="/usr/gnat"
LD_LIBRARY_PATH_64=$prefix/lib:$LD_LIBRARY_PATH_64
PKG_CONFIG_PATH=$prefix/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
GDK_PIXBUF_MODULE_FILE=$prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
GDK_PIXBUF_MODULEDIR=$prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders/
FONTCONFIG_FILE=/etc/fonts/fonts.conf
XDG_DATA_DIRS=$prefix/share:$XDG_DATA_DIRS
XDG_CONFIG_DIRS=$prefix/etc:$XDG_CONFIG_DIRS
GSETTINGS_BACKEND=memory
GLADE_BASE_DIR=$prefix
GPR_PROJECT_PATH=$prefix/lib/gnat:$GPR_PROJECT_PATH
export LD_LIBRARY_PATH_64
export PKG_CONFIG_PATH
export GDK_PIXBUF_MODULE_FILE
export GDK_PIXBUF_MODULEDIR
export FONTCONFIG_FILE
export XDG_DATA_DIRS
export XDG_CONFIG_DIRS
export GSETTINGS_BACKEND
export GLADE_BASE_DIR
export GPR_PROJECT_PATH
NOTE1: The first line should be changed if you installed into another directory,
e.g. /usr/gtkada then change prefix="/usr/gtkada"
NOTE2: 1/05/2019 FONTCONFIG_FILE was changed.
- Close Terminal
Test Build Functionalities
The easiest way is to use GPS Wizard
- Create a test directory and run gps
- ~/ada/simplegtkada$
gps
- "create new project", "GtkAda", "Simple Window" can make a simple Hello world.
- Build and Run can check the functionality.
- Check if the Terminal application execution doesn't output any errors:
- ~/ada/simplegtkada/obj$
./main
Full build test using testgtk
- Copy all the install files with -a option to another directory.
- ~/Downloads$
cp -a gtkada-community-community-2018-x86_64-linux-bin gtkada-test
- Delete all files in ~/Downloads/gtkada-test/testgtk/obj
- Delete 2 files testgtk and test_rtree in ~/Downloads/gtkada-test/testgtk
- ~/Downloads/gtkada-test/testgtk$
gprbuild
- All testgtk files should be compiled and linked again.
- Try
./testgtk
and check the functionalities. - ~/Downloads/gtkada-test/testgtk$
./testgtk
Known Issue
gedit issue
gedit from Terminal can't startup, though Nautilus can start it up.
The environment settings should affect it, but I couldn't fix it.
Let me know if anyone know the solution.Compiler reference warnings
These warnings are displayed at both static and static-pic compilings, but I think we can ignore them (they did not happen at 2017):
gtkada-canvas_view.ads:590:07: warning: formal parameter "At_Point" is not referenced
gtkada-canvas_view.ads:591:07: warning: formal parameter "Context" is not referenced
gtkada-canvas_view.ads:792:07: warning: formal parameter "Item" is not referenced
gtkada-canvas_view.ads:1984:07: warning: formal parameter "At_Point" is not referenced
gtkada-canvas_view.ads:1985:07: warning: formal parameter "Context" is not referenced
gtkada-canvas_view.ads:1992:07: warning: formal parameter "View" is not referenced
A Benefit of gtkada 2018 Version
It doesn't display the error messages anymore which were usually in 2016 and 2017 versions such as:
Gtk-Message: Failed to load module "unity-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
when starting up GPS and gtkada applications. It makes me feel better.
Your answer requires serious formatting editings. Maybe it is complete but it is unreadable.
– Francesco Boi
Jan 1 at 23:55
add a comment |
I found the solution.
I write all the story to install gnat-2018 and gtkada-2018 (Adacore) in Ubuntu 18.04.1 from scratch.
Preparation
#1--#8 are just for my memory.
- Install Ubuntu 18.04.1 from scratch
- Install google-chrome
sudo apt install chromium-browser
sudo apt install synaptic
gsettings set org.gnome.desktop.session idle-delay 1800
sudo apt update
sudo apt upgrade
Reboot OS
sudo apt install make
sudo apt install gcc
sudo apt install gprbuild
sudo apt update
sudo apt upgrade
Now, preparations were done.
GNAT Installation
- Download file from https://www.adacore.com/download/more
Gnat-community-2018-20180528-x86_64-linux-bin
- Set the file executable +x or tick property-permission-Execute in Nautilus.
Execute Gnat-community-2018-20180528-x86_64-linux-bin without sudo
sudo causes a warning in the installation process, then do without sudo in terminal, or just
double-click the file in Nautilus.
Installation directory is required soon, enter e.g. /usr/gnat
- After a few minutes, installation Wizard finishes.
- Set PATH.
e.g.export PATH=/usr/gnat/bin:$PATH
e.g. in ~/.bashrc
Now, GPS works and you can use all of Ada functionalities except gtkada.
- Close Terminal
gtkada Preparation
If you want to install in the same directory, e.g. /usr/gnat, then skip next #21.
- gtkada in another directory
If you want to install gtkada in another directory (e.g. /usr/gtkada), do in Terminal:
sudo visudo
Add the same PATH in the "Default" line as below (e.g. /usr/gnat/bin):
Defaults secure_path="/usr/gnat/bin:/usr/local/sbin:...
To save and quit in
visudo
are tricky, do as follows:^o BS BS BS BS Enter Y Y ^x
Enter to check again to make sure,sudo visudo
, then exit with^x
after the checking.
From next, get the missing file libxcb-xlib-so.0.
The file is not available directly, then get the RPM file which includes it, and convert to the deb file format to install Ubuntu to get it out.
- Go to http://rpm.pbone.net/index.php3/stat/3/limit/9/srodzaj/1/dl/40/search/libxcb.so.1/field/1/field/2
- Find PCLinuxOS and go to the link www.pclinuxos.com/pclinuxos/apt/pclinuxos/64bit/RPMS.x86_64/libxcb-1.12-4pclos2017.x86_64.rpm
- Download ftp.ntua.gr libxcb-1.12-4pclos2017.x86_64.rpm
- Set the file executable:
libxcb-1.12-4pclos2017.x86_64.rpm (159.9kB).
Install alien which can convert the RPM file to the DEB file.
sudo apt install alien
Convert from RPM to DEB
sudo alien libxcb-1.12-4pclos2017.x86_64.rpm
libxcb_1.12-5_amd64.deb was generated.
Now, 2 files are here:
mori@envy:~/Downloads$ls -al lib*
-rwxrwxr-x 1 mori mori 159903 Dec 27 18:12 libxcb-1.12-4pclos2017.x86_64.rpm
-rw-r--r-- 1 root root 152024 Jan 1 12:43 libxcb_1.12-5_amd64.deb
- Install DEB package:
sudo dpkg -i libxcb_1.12-5_amd64.deb
- The target file is created in /usr/lib64 directory (not in /usr/lib)
mori@VB:/usr/lib64$ls -al libxcb-xlib*
lrwxrwxrwx 1 root root 31 Dec 25 16:22 libxcb-xlib.so.0 -> ../../usr/lib64/libxcb.so.1.1.0
lrwxrwxrwx 1 root root 31 Dec 25 16:22 libxcb-xlib.so.0.0.0 -> ../../usr/lib64/libxcb.so.1.1.0
The real file is libxcb.so.1.1.0, and libxcb-xlib.so.0 is just the sym-link.
Now, save only libxcb.so.1.1.0 to another safety place, I used a USB drive.
Uninstall the deb package:
sudo dpkg -r libxcb
Now, you got the missing file, and set the file into the gtkada installer next.
- Download gtkada-2018 (choose the platform and year)
gtkada-community-2018-20180523-x86_64-linux-bin.tar.gz 136.9 MiB May 24 2018 - Set it executable
- Extract file
- Copy the fie libxcb.so.1.1.0 into gtk-bin/lib64 directory:
Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib64 - Set libxcb.so.1.1.0 executable
- Set sym-link
gtk-bin/lib64$sudo ln -s ./libxcb.so.1.1.0 ./libxcb-xlib.so.0
- Check if the sym-link is created
/Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib64$ls -al libxcb*
-rwxr-xr-x 1 mori mori 154424 Aug 16 2017 libxcb.so.1.1.0
lrwxrwxrwx 1 root root 17 Dec 25 22:18 libxcb-xlib.so.0 -> ./libxcb.so.1.1.0 - Copy once more libxcb.so.1.1.0 into gtk-bin/lib directory:
Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib - Set libxcb.so.1.1.0 executable
- Set sym-link
gtk-bin/lib$sudo ln -s ./libxcb.so.1.1.0 ./libxcb-xlib.so.0
- Check if the sym-link is created
/Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib$ls -al libxcb*
-rwxr-xr-x 1 mori mori 154424 Aug 16 2017 libxcb.so.1.1.0
lrwxrwxrwx 1 root root 17 Dec 25 22:18 libxcb-xlib.so.0 -> ./libxcb.so.1.1.0
Now you got prepared all the settings.
gtkada Installation
- Downloads/gtkada-community-community-2018-x86_64-linux-bin$
sudo ./doinstall
Set installation directory /usr/gnat (same) or /usr/gtkada or else.
After a few minutes, installation finishes.
Set gtkada Environments
Do not follow the installer's comments, they are for some other OS's.
Now, the bottom of ~/.bashrc is:
export PATH=/usr/gnat/bin:$PATH
Add one more line like this
. ./gtkada-env.sh
(Note: dot-space-dot)
Create a text file ~/gtkada-env.sh with the following text:
prefix="/usr/gnat"
LD_LIBRARY_PATH_64=$prefix/lib:$LD_LIBRARY_PATH_64
PKG_CONFIG_PATH=$prefix/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
GDK_PIXBUF_MODULE_FILE=$prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
GDK_PIXBUF_MODULEDIR=$prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders/
FONTCONFIG_FILE=/etc/fonts/fonts.conf
XDG_DATA_DIRS=$prefix/share:$XDG_DATA_DIRS
XDG_CONFIG_DIRS=$prefix/etc:$XDG_CONFIG_DIRS
GSETTINGS_BACKEND=memory
GLADE_BASE_DIR=$prefix
GPR_PROJECT_PATH=$prefix/lib/gnat:$GPR_PROJECT_PATH
export LD_LIBRARY_PATH_64
export PKG_CONFIG_PATH
export GDK_PIXBUF_MODULE_FILE
export GDK_PIXBUF_MODULEDIR
export FONTCONFIG_FILE
export XDG_DATA_DIRS
export XDG_CONFIG_DIRS
export GSETTINGS_BACKEND
export GLADE_BASE_DIR
export GPR_PROJECT_PATH
NOTE1: The first line should be changed if you installed into another directory,
e.g. /usr/gtkada then change prefix="/usr/gtkada"
NOTE2: 1/05/2019 FONTCONFIG_FILE was changed.
- Close Terminal
Test Build Functionalities
The easiest way is to use GPS Wizard
- Create a test directory and run gps
- ~/ada/simplegtkada$
gps
- "create new project", "GtkAda", "Simple Window" can make a simple Hello world.
- Build and Run can check the functionality.
- Check if the Terminal application execution doesn't output any errors:
- ~/ada/simplegtkada/obj$
./main
Full build test using testgtk
- Copy all the install files with -a option to another directory.
- ~/Downloads$
cp -a gtkada-community-community-2018-x86_64-linux-bin gtkada-test
- Delete all files in ~/Downloads/gtkada-test/testgtk/obj
- Delete 2 files testgtk and test_rtree in ~/Downloads/gtkada-test/testgtk
- ~/Downloads/gtkada-test/testgtk$
gprbuild
- All testgtk files should be compiled and linked again.
- Try
./testgtk
and check the functionalities. - ~/Downloads/gtkada-test/testgtk$
./testgtk
Known Issue
gedit issue
gedit from Terminal can't startup, though Nautilus can start it up.
The environment settings should affect it, but I couldn't fix it.
Let me know if anyone know the solution.Compiler reference warnings
These warnings are displayed at both static and static-pic compilings, but I think we can ignore them (they did not happen at 2017):
gtkada-canvas_view.ads:590:07: warning: formal parameter "At_Point" is not referenced
gtkada-canvas_view.ads:591:07: warning: formal parameter "Context" is not referenced
gtkada-canvas_view.ads:792:07: warning: formal parameter "Item" is not referenced
gtkada-canvas_view.ads:1984:07: warning: formal parameter "At_Point" is not referenced
gtkada-canvas_view.ads:1985:07: warning: formal parameter "Context" is not referenced
gtkada-canvas_view.ads:1992:07: warning: formal parameter "View" is not referenced
A Benefit of gtkada 2018 Version
It doesn't display the error messages anymore which were usually in 2016 and 2017 versions such as:
Gtk-Message: Failed to load module "unity-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
when starting up GPS and gtkada applications. It makes me feel better.
I found the solution.
I write all the story to install gnat-2018 and gtkada-2018 (Adacore) in Ubuntu 18.04.1 from scratch.
Preparation
#1--#8 are just for my memory.
- Install Ubuntu 18.04.1 from scratch
- Install google-chrome
sudo apt install chromium-browser
sudo apt install synaptic
gsettings set org.gnome.desktop.session idle-delay 1800
sudo apt update
sudo apt upgrade
Reboot OS
sudo apt install make
sudo apt install gcc
sudo apt install gprbuild
sudo apt update
sudo apt upgrade
Now, preparations were done.
GNAT Installation
- Download file from https://www.adacore.com/download/more
Gnat-community-2018-20180528-x86_64-linux-bin
- Set the file executable +x or tick property-permission-Execute in Nautilus.
Execute Gnat-community-2018-20180528-x86_64-linux-bin without sudo
sudo causes a warning in the installation process, then do without sudo in terminal, or just
double-click the file in Nautilus.
Installation directory is required soon, enter e.g. /usr/gnat
- After a few minutes, installation Wizard finishes.
- Set PATH.
e.g.export PATH=/usr/gnat/bin:$PATH
e.g. in ~/.bashrc
Now, GPS works and you can use all of Ada functionalities except gtkada.
- Close Terminal
gtkada Preparation
If you want to install in the same directory, e.g. /usr/gnat, then skip next #21.
- gtkada in another directory
If you want to install gtkada in another directory (e.g. /usr/gtkada), do in Terminal:
sudo visudo
Add the same PATH in the "Default" line as below (e.g. /usr/gnat/bin):
Defaults secure_path="/usr/gnat/bin:/usr/local/sbin:...
To save and quit in
visudo
are tricky, do as follows:^o BS BS BS BS Enter Y Y ^x
Enter to check again to make sure,sudo visudo
, then exit with^x
after the checking.
From next, get the missing file libxcb-xlib-so.0.
The file is not available directly, then get the RPM file which includes it, and convert to the deb file format to install Ubuntu to get it out.
- Go to http://rpm.pbone.net/index.php3/stat/3/limit/9/srodzaj/1/dl/40/search/libxcb.so.1/field/1/field/2
- Find PCLinuxOS and go to the link www.pclinuxos.com/pclinuxos/apt/pclinuxos/64bit/RPMS.x86_64/libxcb-1.12-4pclos2017.x86_64.rpm
- Download ftp.ntua.gr libxcb-1.12-4pclos2017.x86_64.rpm
- Set the file executable:
libxcb-1.12-4pclos2017.x86_64.rpm (159.9kB).
Install alien which can convert the RPM file to the DEB file.
sudo apt install alien
Convert from RPM to DEB
sudo alien libxcb-1.12-4pclos2017.x86_64.rpm
libxcb_1.12-5_amd64.deb was generated.
Now, 2 files are here:
mori@envy:~/Downloads$ls -al lib*
-rwxrwxr-x 1 mori mori 159903 Dec 27 18:12 libxcb-1.12-4pclos2017.x86_64.rpm
-rw-r--r-- 1 root root 152024 Jan 1 12:43 libxcb_1.12-5_amd64.deb
- Install DEB package:
sudo dpkg -i libxcb_1.12-5_amd64.deb
- The target file is created in /usr/lib64 directory (not in /usr/lib)
mori@VB:/usr/lib64$ls -al libxcb-xlib*
lrwxrwxrwx 1 root root 31 Dec 25 16:22 libxcb-xlib.so.0 -> ../../usr/lib64/libxcb.so.1.1.0
lrwxrwxrwx 1 root root 31 Dec 25 16:22 libxcb-xlib.so.0.0.0 -> ../../usr/lib64/libxcb.so.1.1.0
The real file is libxcb.so.1.1.0, and libxcb-xlib.so.0 is just the sym-link.
Now, save only libxcb.so.1.1.0 to another safety place, I used a USB drive.
Uninstall the deb package:
sudo dpkg -r libxcb
Now, you got the missing file, and set the file into the gtkada installer next.
- Download gtkada-2018 (choose the platform and year)
gtkada-community-2018-20180523-x86_64-linux-bin.tar.gz 136.9 MiB May 24 2018 - Set it executable
- Extract file
- Copy the fie libxcb.so.1.1.0 into gtk-bin/lib64 directory:
Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib64 - Set libxcb.so.1.1.0 executable
- Set sym-link
gtk-bin/lib64$sudo ln -s ./libxcb.so.1.1.0 ./libxcb-xlib.so.0
- Check if the sym-link is created
/Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib64$ls -al libxcb*
-rwxr-xr-x 1 mori mori 154424 Aug 16 2017 libxcb.so.1.1.0
lrwxrwxrwx 1 root root 17 Dec 25 22:18 libxcb-xlib.so.0 -> ./libxcb.so.1.1.0 - Copy once more libxcb.so.1.1.0 into gtk-bin/lib directory:
Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib - Set libxcb.so.1.1.0 executable
- Set sym-link
gtk-bin/lib$sudo ln -s ./libxcb.so.1.1.0 ./libxcb-xlib.so.0
- Check if the sym-link is created
/Downloads/gtkada-community-community-2018-x86_64-linux-bin/gtk-bin/lib$ls -al libxcb*
-rwxr-xr-x 1 mori mori 154424 Aug 16 2017 libxcb.so.1.1.0
lrwxrwxrwx 1 root root 17 Dec 25 22:18 libxcb-xlib.so.0 -> ./libxcb.so.1.1.0
Now you got prepared all the settings.
gtkada Installation
- Downloads/gtkada-community-community-2018-x86_64-linux-bin$
sudo ./doinstall
Set installation directory /usr/gnat (same) or /usr/gtkada or else.
After a few minutes, installation finishes.
Set gtkada Environments
Do not follow the installer's comments, they are for some other OS's.
Now, the bottom of ~/.bashrc is:
export PATH=/usr/gnat/bin:$PATH
Add one more line like this
. ./gtkada-env.sh
(Note: dot-space-dot)
Create a text file ~/gtkada-env.sh with the following text:
prefix="/usr/gnat"
LD_LIBRARY_PATH_64=$prefix/lib:$LD_LIBRARY_PATH_64
PKG_CONFIG_PATH=$prefix/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
GDK_PIXBUF_MODULE_FILE=$prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
GDK_PIXBUF_MODULEDIR=$prefix/lib/gdk-pixbuf-2.0/2.10.0/loaders/
FONTCONFIG_FILE=/etc/fonts/fonts.conf
XDG_DATA_DIRS=$prefix/share:$XDG_DATA_DIRS
XDG_CONFIG_DIRS=$prefix/etc:$XDG_CONFIG_DIRS
GSETTINGS_BACKEND=memory
GLADE_BASE_DIR=$prefix
GPR_PROJECT_PATH=$prefix/lib/gnat:$GPR_PROJECT_PATH
export LD_LIBRARY_PATH_64
export PKG_CONFIG_PATH
export GDK_PIXBUF_MODULE_FILE
export GDK_PIXBUF_MODULEDIR
export FONTCONFIG_FILE
export XDG_DATA_DIRS
export XDG_CONFIG_DIRS
export GSETTINGS_BACKEND
export GLADE_BASE_DIR
export GPR_PROJECT_PATH
NOTE1: The first line should be changed if you installed into another directory,
e.g. /usr/gtkada then change prefix="/usr/gtkada"
NOTE2: 1/05/2019 FONTCONFIG_FILE was changed.
- Close Terminal
Test Build Functionalities
The easiest way is to use GPS Wizard
- Create a test directory and run gps
- ~/ada/simplegtkada$
gps
- "create new project", "GtkAda", "Simple Window" can make a simple Hello world.
- Build and Run can check the functionality.
- Check if the Terminal application execution doesn't output any errors:
- ~/ada/simplegtkada/obj$
./main
Full build test using testgtk
- Copy all the install files with -a option to another directory.
- ~/Downloads$
cp -a gtkada-community-community-2018-x86_64-linux-bin gtkada-test
- Delete all files in ~/Downloads/gtkada-test/testgtk/obj
- Delete 2 files testgtk and test_rtree in ~/Downloads/gtkada-test/testgtk
- ~/Downloads/gtkada-test/testgtk$
gprbuild
- All testgtk files should be compiled and linked again.
- Try
./testgtk
and check the functionalities. - ~/Downloads/gtkada-test/testgtk$
./testgtk
Known Issue
gedit issue
gedit from Terminal can't startup, though Nautilus can start it up.
The environment settings should affect it, but I couldn't fix it.
Let me know if anyone know the solution.Compiler reference warnings
These warnings are displayed at both static and static-pic compilings, but I think we can ignore them (they did not happen at 2017):
gtkada-canvas_view.ads:590:07: warning: formal parameter "At_Point" is not referenced
gtkada-canvas_view.ads:591:07: warning: formal parameter "Context" is not referenced
gtkada-canvas_view.ads:792:07: warning: formal parameter "Item" is not referenced
gtkada-canvas_view.ads:1984:07: warning: formal parameter "At_Point" is not referenced
gtkada-canvas_view.ads:1985:07: warning: formal parameter "Context" is not referenced
gtkada-canvas_view.ads:1992:07: warning: formal parameter "View" is not referenced
A Benefit of gtkada 2018 Version
It doesn't display the error messages anymore which were usually in 2016 and 2017 versions such as:
Gtk-Message: Failed to load module "unity-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
when starting up GPS and gtkada applications. It makes me feel better.
edited Jan 6 at 6:44
answered Jan 1 at 23:13
moriymoriy
12
12
Your answer requires serious formatting editings. Maybe it is complete but it is unreadable.
– Francesco Boi
Jan 1 at 23:55
add a comment |
Your answer requires serious formatting editings. Maybe it is complete but it is unreadable.
– Francesco Boi
Jan 1 at 23:55
Your answer requires serious formatting editings. Maybe it is complete but it is unreadable.
– Francesco Boi
Jan 1 at 23:55
Your answer requires serious formatting editings. Maybe it is complete but it is unreadable.
– Francesco Boi
Jan 1 at 23:55
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53407208%2fgtkada-2018-adacore-installation-issue-on-ubuntu-18-04-1%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown