Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Installation, Compiling and Running of theide » [fatal error:] on Centos 7
[fatal error:] on Centos 7 [message #47147] Wed, 21 December 2016 16:07 Go to next message
MrSarup
Messages: 30
Registered: December 2016
Member
Hello,

On Centos 7 64bits, I got following errors during installation of TheIDE/uppsrc package from SF.net after untarring upp-x11-src-9251.tar.gz and executing make:

mkdir -p _out/plugin/png//home/upp/Scripts/GCCMK.bm-Gcc-Gui-Linux-Mt-Posix-Shared/
c++ -c -x c++ -O3 -ffunction-sections -fdata-sections  -I./  -I/usr/include/freetype2 -I/usr/include/gtk-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include/gtk-2.0 -I/usr/X11R6/include/glib-2.0 -I/usr/X11R6/lib/glib-2.0/include -I/usr/X11R6/lib/gtk-2.0/include -I/usr/X11R6/include/cairo -I/usr/X11R6/include/pango-1.0 -I/usr/X11R6/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gtkglext-1.0 -I/usr/lib/gtkglext-1.0/include -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/lib/i386-linux-gnu/gtk-2.0/include -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -DflagGUI -DflagMT -DflagGCC -DflagSHARED -DflagLINUX -DflagPOSIX -DflagMAIN  ide/BaseDlg.cpp -o _out/ide//home/upp/Scripts/GCCMK.bm-Gcc-Gui-Linux-Main-Mt-Posix-Shared/BaseDlg.o
In file included from ./CtrlCore/CtrlCore.h:37:0,
                 from ./CtrlLib/CtrlLib.h:4,
                 from ./ide/Common/Common.h:5,
                 from ide/ide.h:4,
                 from ide/BaseDlg.cpp:1:
./CtrlCore/Gtk.h:16:21: fatal error: gtk/gtk.h: No such file or directory
 #include <gtk/gtk.h>
                     ^
compilation terminated.

Further, I also got during the same process:
gmake[1]: Leaving directory `/root/install/upp/uppsrc'
cp: cannot stat 'uppsrc/ide.out': No such file or directory

Is there a solution for this?

[Updated on: Wed, 21 December 2016 16:08]

Report message to a moderator

Re: [fatal error:] on Centos 7 [message #47149 is a reply to message #47147] Wed, 21 December 2016 20:39 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 307
Registered: July 2009
Senior Member
./CtrlCore/Gtk.h:16:21: fatal error: gtk/gtk.h: No such file or directory
 #include <gtk/gtk.h>


You just need to install development libraries.
Re: [fatal error:] on Centos 7 [message #47157 is a reply to message #47149] Fri, 23 December 2016 07:44 Go to previous messageGo to next message
MrSarup
Messages: 30
Registered: December 2016
Member
Hello Zbych,

Thanks for your reply.

Which library do I need to install? Do you mean some external Linux libraries or something in U++ is missing?

It would be better to have this mentioned somewhere in FAQ that mentioned prerequisites of libraries.

PS: I am a newbie to U++.
Re: [fatal error:] on Centos 7 [message #47159 is a reply to message #47147] Fri, 23 December 2016 19:03 Go to previous messageGo to next message
deep is currently offline  deep
Messages: 197
Registered: July 2011
Location: Bangalore
Experienced Member
This is from debian file from distro.

apt-get replaced with yum

yum install g++
yum install make
yum install libgtk2.0-dev
yum install libnotify-dev
yum install libbz2-dev
yum install sox


Warm Regards

Deepak
Re: [fatal error:] on Centos 7 [message #47160 is a reply to message #47147] Sat, 24 December 2016 03:12 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 801
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor

On Debian (or at least at *Ubuntu) there's package "build-essentials", which does install basic things like binutils, gcc, etc... but I still think the gnumake, libgtkXYZ-dev, and few more are not "essential" (logically), so it's not a single prerequisite. Just covering many "basic" packages in one install.
Re: [fatal error:] on Centos 7 [message #47167 is a reply to message #47147] Sun, 25 December 2016 08:13 Go to previous messageGo to next message
MrSarup
Messages: 30
Registered: December 2016
Member
Hello all,

Thanks for your reply. Both the answers were in the right direction. Although they were not perfect answers, they gave me a hint that I should not built the way I was doing it because there is upp.spec existing in the tar ball!

Of course, there were some binaries missing, which Deepak mentioned above. But that was not it.

The best way to go through is executing rpmbuild. Setup up rpmbuild properly and use the command mentioned in the upp.spec file.

This will find out if there are some other binaries missing. In my case, it did find out, which I installed though yum.

Then, everything got build, I hope (not tested it all yet).

In my case, some dir and files got build outside of upp installation. I am not sure if this is a bug or some minor changes needs to be done. In this regards, I have already placed a notice in the following thread here:

http://www.ultimatepp.org/forums/index.php?t=msg&th=9817 &goto=47166&#msg_47166

My next task is to find out how to compile the examples on Centos 7 64bits with GCC and see how I can make console applications work on the Centos 7 server.
Re: [fatal error:] on Centos 7 [message #47210 is a reply to message #47167] Thu, 29 December 2016 09:04 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 209
Registered: August 2008
Location: France
Experienced Member
If you follow instructions from my other messages, you can compile upp without issue on Centos 7.

Here they are again:

- Install required build dependencies: yum install gtk2-devel pango-devel atk-devel cairo-devel libnotify-devel bzip2-devel xorg-x11-server-devel freetype-devel expat-devel rpm-build gcc-c++ gcc

- Download upp-x11-src-9251.tar.gz (last stable release) from sourceforge https:// sourceforge.net/projects/upp/files/upp/2015.2/upp-x11-src-92 51.tar.gz/download

- Uncompress upp-x11-src-9251.tar.gz (last stable release): tar zxvf upp-x11-src-9251.tar.gz

- Change dir to upp-x11-src-9251: cd upp-x11-src-9251

- Build upp ide and umk for console build: make
Re: [fatal error:] on Centos 7 [message #47211 is a reply to message #47167] Thu, 29 December 2016 09:43 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 209
Registered: August 2008
Location: France
Experienced Member

Because I want to speed up the process, here is a temporary link to a tarball http://dl.free.fr/i4bACU1km.
It contains:

* a standard source rpm package. You can build it like this: rpmbuild --rebuild upp-9251-1.src.rpm

* a standard binary rpm package. You can install it like this: yum install upp-9251-1.x86_64.rpm

Both were built on Centos 7 x86_64.
Re: [fatal error:] on Centos 7 [message #47212 is a reply to message #47211] Thu, 29 December 2016 11:16 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 640
Registered: September 2012
Location: Poland, Kraków
Contributor
Hello amrein,

I would like to thank you for your job of renovating rpm build. I have got one question here - do we need following code in upp.spec:
cat > %{buildroot}/%{_datadir}/%{name}/GCC.bm << EOF
BUILDER		= "GCC";
COMPILER	= "g++";
DEBUG_INFO	= "2";
DEBUG_BLITZ	= "1";
DEBUG_LINKMODE	= "1";
DEBUG_LINK	= "$LINK";
DEBUG_OPTIONS	= "-O0";
DEBUG_FLAGS	= "";
RELEASE_BLITZ		= "0";
RELEASE_LINKMODE	= "1";
RELEASE_OPTIONS		= "-O3 -ffunction-sections -fdata-sections";
RELEASE_SIZE_OPTIONS	= "-Os -finline-limit=20 -ffunction-sections -fdata-sections";
RELEASE_FLAGS	= "";
RELEASE_LINK	= "-Wl,--gc-sections $LINK";
DEBUGGER	= "gdb";
PATH		= "";
INCLUDE		= "$INCLUDEDIR";
LIB		= "$LIBDIR";
REMOTE_HOST	= "";
REMOTE_OS	= "";
REMOTE_TRANSFER	= "";
REMOTE_MAP	= "";
LINKMODE_LOCK	= "0";
EOF


This is redundant with information provided with build method. Moreover the flags is not compatible with each other. Please let me know what do you think about this?

Sincerely,
Klugier


Ultimate++ - one framework to rule them all.
Re: [fatal error:] on Centos 7 [message #47215 is a reply to message #47211] Thu, 29 December 2016 12:18 Go to previous messageGo to next message
MrSarup
Messages: 30
Registered: December 2016
Member
Hello Amrein-Marie,
amrein wrote on Thu, 29 December 2016 09:43

It contains:
* a standard source rpm package. You can build it like this: rpmbuild --rebuild upp-9251-1.src.rpm
* a standard binary rpm package. You can install it like this: yum install upp-9251-1.x86_64.rpm
Both were built on Centos 7 x86_64.

Thank you very much for taking your time and making efforts to help me.

I have initially installed the rpm binary. It has installed umk + theide. But I did not need theide because I do not have any GUI on my Linux server. That does not matter if some more garbage is hanging on my server, provided I can work.

I could not come forward even with this rpm. It throws an error "Package not found". Thus, I compiled from src.rpm, which of course takes a long time. Following is the command I have executed:

umk reference SocketServer GCC -ab +DLL,SHARED SocketServer.so


Is this command correct? I have also substituted reference with /usr/share/upp/reference. It did not help.

I also find that there are no .var files under /root/.upp or anywhere.
Are they necessary? Is there something I am missing or is the environment not properly setup? What I do not understand is why do I need to give +DLL, where I am compiling on Linux? May be this is normal.
Do I need to change to MT instead of GUI?

There is still a worm in there and it stops me to come forward.

Again, thanks for your help...
Re: [fatal error:] on Centos 7 [message #47216 is a reply to message #47212] Thu, 29 December 2016 13:17 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 209
Registered: August 2008
Location: France
Experienced Member
To get theide and umk working out of the box, upp.spec needs to create its own GCC.bm.

The main differences between GCC.bm created by upp.spec and the one created inside the domake script explain why:

* The upp.spec file add this line to force the use of g++ or theide won't work out of the box:

COMPILER = "g++";

* The upp.spec force the use of libpng and libfreetype on Fedora to prevent error while linking. On Fedora:

DEBUG_LINK = "-lpng16 -lfreetype";
RELEASE_LINK = "-Wl,--gc-sections -lpng16 -lfreetype";

* The upp.spec replace the "zero" debugger with "gdb" because I can't find any "zero" debugger on main stream Linux rpm distributions:

DEBUGGER = "gdb";

* The upp.spec create the INCLUDE and LIB variables using pkg-config because includes and libraries are Linux distribution dependent.

INCLUDE = "$INCLUDEDIR";
LIB = "$LIBDIR";

* The upp.spec file doesn't force gcc to use c++11 and so the line << COMMON_CPP_OPTIONS = "-std=c++11"; >> is not included.


In fact, the best way for this would be to take the time to think about what's the best way to (1) package upp source (2) build upp (3) test upp. But not just for rpm based distributions but for all supported platforms (Linux, Windows, MacOS, ...). I think about templates, multi-threads compilation, virtual machines compiling last upp source (openSUSE Build Service for example), and more.
Re: [fatal error:] on Centos 7 [message #47220 is a reply to message #47215] Thu, 29 December 2016 17:57 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 209
Registered: August 2008
Location: France
Experienced Member
For me the correct command is:
umk reference SocketServer GCC.bm -absv

You need GCC.bm to be inside ~/.upp/theide/ and also to copy all source from /usr/share/upp inside ~/upp and more.
Here is how I built SocketServer with umk:
cp -r /usr/share/upp ~/
mkdir -p ~/.upp/theide
cp /usr/share/upp/GCC.bm ~/.upp/theide/
cd ~/upp/
umk reference SocketServer GCC -absv

You can now run SocketServer
~/.upp/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer
Re: [fatal error:] on Centos 7 [message #47221 is a reply to message #47220] Thu, 29 December 2016 18:05 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 209
Registered: August 2008
Location: France
Experienced Member
And if you want to test it, install netcat then run SocketServer and send the word "time" to port 3214:

sudo yum install nc

~/.upp/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer &

echo time | nc localhost 3214

killall SocketServer

Re: [fatal error:] on Centos 7 [message #47222 is a reply to message #47147] Thu, 29 December 2016 19:56 Go to previous messageGo to next message
MrSarup
Messages: 30
Registered: December 2016
Member
Hello Amrein-Marie,

Again, thanks for ypour help. I do not seem to have any luck further. Following are the errors I get, when I execute commands in bash given by you in the above post:
➜  umk reference SocketServer GCC.bm -absv
    Inline assembly: /root/upp/reference
    Output directory: /root/.upp/umk/_out
    Main package: /root/upp/reference/SocketServer/SocketServer.upp
    Package does not exist
    
➜  cp -r /usr/share/upp ~/

➜  mkdir -p ~/.upp/theide

➜  cp /usr/share/upp/GCC.bm ~/.upp/theide/

➜  cd ~/upp/

➜  umk reference SocketServer GCC -absv

    Inline assembly: /root/upp/reference
    Output directory: /root/.upp/umk/_out
    Main package: /root/upp/reference/SocketServer/SocketServer.upp
    Build method: /root/upp/GCC.bm
    Cleaning SocketServer
    Cleaning Core
    Cleaning Web
    ...done
    
    ----- Core ( GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX ) (1 / 3)
    cd /root/upp/reference/Core
    ----- Web ( GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX ) (2 / 3)
    cd /root/upp/reference/Web
    ----- SocketServer ( MAIN GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX ) (3 / 3)
    
    cd /root/upp/reference/SocketServer
    
    SocketServer.cpp
    
    g++ -c  -I"/root/upp/reference" -I"/usr/include/freetype2" -I"/usr/include/gtk-2.0" -I"/usr/lib64/gtk-2.0/include" -I"/usr/include/atk-1.0" -I"/usr/include/cairo" -I"/usr/include/gdk-pixbuf-2.0" -I"/usr/include/pango-1.0" -I"/usr/include/glib-2.0" -I"/usr/lib64/glib-2.0/include" -I"/usr/include/pixman-1" -I"/usr/include/libpng15" -I"/usr/include/libdrm" -I"/usr/include/harfbuzz" -I"/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared" -DflagMAIN -DflagGCC -DflagDEBUG -DflagSHARED -DflagDEBUG_FULL -DflagBLITZ -DflagLINUX -DflagPOSIX -ggdb -g2  -fexceptions -D_DEBUG -O0 -x c++ "/root/upp/reference/SocketServer/SocketServer.cpp"  -o "/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o"
    /root/upp/reference/SocketServer/SocketServer.cpp:1:23: fatal error: Core/Core.h: No such file or directory
    #include <Core/Core.h>
                       ^      
    compilation terminated.
    
    g++ -c  -I"/root/upp/reference" -I"/usr/include/freetype2" -I"/usr/include/gtk-2.0" -I"/usr/lib64/gtk-2.0/include" -I"/usr/include/atk-1.0" -I"/usr/include/cairo" -I"/usr/include/gdk-pixbuf-2.0" -I"/usr/include/pango-1.0" -I"/usr/include/glib-2.0" -I"/usr/lib64/glib-2.0/include" -I"/usr/include/pixman-1" -I"/usr/include/libpng15" -I"/usr/include/libdrm" -I"/usr/include/harfbuzz" -I"/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared" -DflagMAIN -DflagGCC -DflagDEBUG -DflagSHARED -DflagDEBUG_FULL -DflagBLITZ -DflagLINUX -DflagPOSIX -ggdb -g2  -fexceptions -D_DEBUG -O0 -x c++ "/root/upp/reference/SocketServer/SocketServer.cpp"  -o "/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o"
    
    Error executing g++ -c  -I"/root/upp/reference" -I"/usr/include/freetype2" -I"/usr/include/gtk-2.0" -I"/usr/lib64/gtk-2.0/include" -I"/usr/include/atk-1.0" -I"/usr/include/cairo" -I"/usr/include/gdk-pixbuf-2.0" -I"/usr/include/pango-1.0" -I"/usr/include/glib-2.0" -I"/usr/lib64/glib-2.0/include" -I"/usr/include/pixman-1" -I"/usr/include/libpng15" -I"/usr/include/libdrm" -I"/usr/include/harfbuzz" -I"/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared" -DflagMAIN -DflagGCC -DflagDEBUG -DflagSHARED -DflagDEBUG_FULL -DflagBLITZ -DflagLINUX -DflagPOSIX -ggdb -g2  -fexceptions -D_DEBUG -O0 -x c++ "/root/upp/reference/SocketServer/SocketServer.cpp"  -o "/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o"
    compiled in (0:00.10)
    
    SocketServer: 1 file(s) built in (0:00.10), 104 msecs / file, duration = 113 msecs

    There were errors. (0:00.11)
    
➜  upp gcc -v
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
    Target: x86_64-redhat-linux
    Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
    Thread model: posix
    gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)

This is a SIMILAR ERROR I HAVE GOT BEFORE IN THE BEGINING OF THIS THREAD! It appears that GCC.bm needs to be modified to recognize INCLUDE /root/upp/uppsrc. Do you have any more hints?

[Updated on: Thu, 29 December 2016 19:56]

Report message to a moderator

Re: [fatal error:] on Centos 7 [message #47223 is a reply to message #47147] Thu, 29 December 2016 21:14 Go to previous messageGo to next message
MrSarup
Messages: 30
Registered: December 2016
Member
Hello Amrein-Marie,
In your suggestion, you have a typo and the path umk/ is missed out.
~/.upp/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer

The correct path would be:
~/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o &

In the /root/upp/GCC.bm, I have included the path /root/upp/uppsrc; as follows:
INCLUDE		= "/root/upp/uppsrc;/usr/include/freetype2;..."

With this changes, I could come forward and the compilation with debugging began! This ended up with an exit = 1 with following debugging output:
➜  upp umk reference SocketServer GCC -absv
		Inline assembly: /root/upp/reference
		Output directory: /root/.upp/umk/_out
		Main package: /root/upp/reference/SocketServer/SocketServer.upp
		Build method: /root/upp/GCC.bm
		Cleaning SocketServer
		Cleaning Core
		Cleaning Web
		...done
		----- Core ( GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX ) (1 / 3)
		cd /root/upp/reference/Core
		----- Web ( GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX ) (2 / 3)
		cd /root/upp/reference/Web
		----- SocketServer ( MAIN GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX ) (3 / 3)
		cd /root/upp/reference/SocketServer
		SocketServer.cpp
		g++ -c  -I"/root/upp/reference" -I"/root/upp/uppsrc" -I"/usr/include/freetype2" -I"/usr/include/gtk-2.0" -I"/usr/lib64/gtk-2.0/include" -I"/usr/include/atk-1.0" -I"/usr/include/cairo" -I"/usr/include/gdk-pixbuf-2.0" -I"/usr/include/pango-1.0" -I"/usr/include/glib-2.0" -I"/usr/lib64/glib-2.0/include" -I"/usr/include/pixman-1" -I"/usr/include/libpng15" -I"/usr/include/libdrm" -I"/usr/include/harfbuzz" -I"/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared" -DflagMAIN -DflagGCC -DflagDEBUG -DflagSHARED -DflagDEBUG_FULL -DflagBLITZ -DflagLINUX -DflagPOSIX -ggdb -g2  -fexceptions -D_DEBUG -O0 -x c++ "/root/upp/reference/SocketServer/SocketServer.cpp"  -o "/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o"
		g++ -c  -I"/root/upp/reference" -I"/root/upp/uppsrc" -I"/usr/include/freetype2" -I"/usr/include/gtk-2.0" -I"/usr/lib64/gtk-2.0/include" -I"/usr/include/atk-1.0" -I"/usr/include/cairo" -I"/usr/include/gdk-pixbuf-2.0" -I"/usr/include/pango-1.0" -I"/usr/include/glib-2.0" -I"/usr/lib64/glib-2.0/include" -I"/usr/include/pixman-1" -I"/usr/include/libpng15" -I"/usr/include/libdrm" -I"/usr/include/harfbuzz" -I"/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared" -DflagMAIN -DflagGCC -DflagDEBUG -DflagSHARED -DflagDEBUG_FULL -DflagBLITZ -DflagLINUX -DflagPOSIX -ggdb -g2  -fexceptions -D_DEBUG -O0 -x c++ "/root/upp/reference/SocketServer/SocketServer.cpp"  -o "/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o"
		compiled in (0:00.93)
		SocketServer: 1 file(s) built in (0:00.93), 939 msecs / file, duration = 973 msecs
		Linking...
		g++ -o "/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer" -ggdb -Wl,-O,2  "/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o" -Wl,--start-group  -Wl,--end-group
		/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o: In function `main':
		/root/upp/reference/SocketServer/SocketServer.cpp:5: undefined reference to `Upp::AppInit__(int, char const**, char const**)'
		/root/upp/reference/SocketServer/SocketServer.cpp:5: undefined reference to `Upp::AppExecute__(void (*)())'
		/root/upp/reference/SocketServer/SocketServer.cpp:5: undefined reference to `Upp::AppExit__()'
		/root/upp/reference/SocketServer/SocketServer.cpp:5: undefined reference to `Upp::GetExitCode()'
		/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o: In function `ConsoleMainFn_()':
		/root/upp/reference/SocketServer/SocketServer.cpp:7: undefined reference to `Upp::TcpSocket::TcpSocket()'
		/root/upp/reference/SocketServer/SocketServer.cpp:8: undefined reference to `Upp::TcpSocket::Listen(int, int, bool, bool, void*)'
		/root/upp/reference/SocketServer/SocketServer.cpp:9: undefined reference to `Upp::Cout()'
		/root/upp/reference/SocketServer/SocketServer.cpp:10: undefined reference to `Upp::SetExitCode(int)'
		/root/upp/reference/SocketServer/SocketServer.cpp:13: undefined reference to `Upp::Cout()'
		/root/upp/reference/SocketServer/SocketServer.cpp:15: undefined reference to `Upp::TcpSocket::TcpSocket()'
		/root/upp/reference/SocketServer/SocketServer.cpp:16: undefined reference to `Upp::TcpSocket::Accept(Upp::TcpSocket&)'
		/root/upp/reference/SocketServer/SocketServer.cpp:17: undefined reference to `Upp::TcpSocket::GetLine(int)'
		/root/upp/reference/SocketServer/SocketServer.cpp:18: undefined reference to `Upp::TcpSocket::GetPeerAddr() const'
		/root/upp/reference/SocketServer/SocketServer.cpp:18: undefined reference to `Upp::Cout()'
		/root/upp/reference/SocketServer/SocketServer.cpp:20: undefined reference to `Upp::GetSysTime()'
		/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o: In function `String':
		/root/upp/uppsrc/Core/AString.hpp:305: undefined reference to `Upp::String0::Set0(char const*, int)'
		/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o: In function `__static_initialization_and_destruction_0':
		/root/upp/uppsrc/Core/Core.h:337: undefined reference to `MemDiagCls::MemDiagCls()'
		/root/upp/uppsrc/Core/Core.h:337: undefined reference to `MemDiagCls::~MemDiagCls()'
		/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o: In function `Upp::String0::Free()':
		/root/upp/uppsrc/Core/String.h:236: undefined reference to `Upp::String0::LFree()'
		/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o: In function `Upp::String Upp::AsString<Upp::Time>(Upp::Time const&)':
		/root/upp/uppsrc/Core/TimeDate.h:157: undefined reference to `Upp::Format(Upp::Time, bool)'
		/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o: In function `Upp::Stream::Put(void const*, int)':
		/root/upp/uppsrc/Core/Stream.h:91: undefined reference to `Upp::AssertFailed(char const*, int, char const*)'
		/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o: In function `Upp::operator<<(Upp::Stream&, char const*)':
		/root/upp/uppsrc/Core/Stream.h:624: undefined reference to `Upp::Stream::Put(char const*)'
		/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o: In function `Upp::String Upp::AsString<int>(int const&)':
		/root/upp/uppsrc/Core/Format.h:28: undefined reference to `Upp::FormatInteger(int)'
		/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o: In function `Upp::TcpSocket::Put(Upp::String const&)':
		/root/upp/uppsrc/Core/Inet.h:228: undefined reference to `Upp::TcpSocket::Put(void const*, int)'
		/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o: In function `Upp::TcpSocket::~TcpSocket()':
		/root/upp/uppsrc/Core/Inet.h:254: undefined reference to `Upp::TcpSocket::Close()'
		/root/upp/uppsrc/Core/Inet.h:254: undefined reference to `Upp::Callback::~Callback()'
		/root/upp/uppsrc/Core/Inet.h:254: undefined reference to `Upp::Callback::~Callback()'
		collect2: error: ld returned 1 exit status
		g++ -o "/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer" -ggdb -Wl,-O,2  "/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o" -Wl,--start-group  -Wl,--end-group
		Error executing g++ -o "/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer" -ggdb -Wl,-O,2  "/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o" -Wl,--start-group  -Wl,--end-group
		Exitcode: 1
		
		There were errors. (0:01.03)
Thereafter I executed the following:
➜  chmod u+x ~/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o

➜  file ~/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o
/root/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped

➜  ldd ~/.upp/umk/_out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer.o
        not a dynamic executable

Because the binary is wrongly compiled, it cannot be executed.

Any further suggestions?
Re: [fatal error:] on Centos 7 [message #47224 is a reply to message #47147] Thu, 29 December 2016 21:24 Go to previous messageGo to next message
MrSarup
Messages: 30
Registered: December 2016
Member
Posted following link for information purposes:

How can I get information about a binary file that won't execute?

http://serverfault.com/questions/730922/how-can-i-get-inform ation-about-a-binary-file-that-wont-execute
Re: [fatal error:] on Centos 7 [message #47225 is a reply to message #47224] Thu, 29 December 2016 23:21 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 209
Registered: August 2008
Location: France
Experienced Member
This is not an executable but an object file.

What is missing: var files describing all assemblies. They are created when you start theide and also by doinstall. You don't use theide so they are not there yet.

Let do this from a clean install shall we.
First, let remove ~/upp and ~/.upp
rm -fr ~/upp
rm -fr ~/.upp


Then:
# Do the same thing as before
cp -r /usr/share/upp ~/
mkdir -p ~/.upp/theide
cp /usr/share/upp/GCC.bm ~/.upp/theide/
cd ~/upp/

# but also create those var files

echo -e "UPP = \"$HOME/upp/uppsrc\"\nOUTPUT = \"$HOME/upp.out\"" > ~/.upp/theide/uppsrc.var
echo -e "UPP = \"$HOME/upp/examples;$HOME/upp/uppsrc\"\nOUTPUT = \"$HOME/upp.out\"" > ~/.upp/theide/examples.var
echo -e "UPP = \"$HOME/upp/reference;$HOME/upp/uppsrc\"\nOUTPUT = \"$HOME/upp.out\"" > ~/.upp/theide/reference.var
echo -e "UPP = \"$HOME/upp/tutorial;$HOME/upp/uppsrc\"\nOUTPUT = \"$HOME/upp.out\"" > ~/.upp/theide/tutorial.var                                                                                                                               
echo -e "UPP = \"$HOME/upp/bazaar;$HOME/upp/uppsrc\"\nOUTPUT = \"$HOME/upp.out\"" > ~/.upp/theide/examples-bazaar.var                                                                                                                          
echo -e "UPP = \"$HOME/MyApps;$HOME/upp/uppsrc\"\nOUTPUT = \"$HOME/upp.out\"" > ~/.upp/theide/MyApps.var                                                                                                                                       
echo -e "UPP = \"$HOME/MyApps;$HOME/upp/bazaar;$HOME/upp/uppsrc\"\nOUTPUT = \"$HOME/upp.out\"" > ~/.upp/theide/MyApps-bazaar.var

# Build SocketServer

umk reference SocketServer GCC -absv

# Run, test and kill the server

~/upp.out/SocketServer/GCC.Debug.Debug_Full.Main.Shared/SocketServer &

echo time | nc localhost 3214

killall SocketServer

[Updated on: Thu, 29 December 2016 23:21]

Report message to a moderator

Re: [fatal error:] on Centos 7 [message #47226 is a reply to message #47225] Thu, 29 December 2016 23:28 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 209
Registered: August 2008
Location: France
Experienced Member
I should add that you are still login as root. It's really a bad habit from Windows and you should login as a regular user.
Someday you will run a command line like the following one, by mistake, and it will remove all your files (even your windows files if your windows partitions are mounted somewhere):

rm -fr ~ /

So be careful and login with a standard user account. Use "su" or "sudo" to get root privileges.
Re: [fatal error:] on Centos 7 [message #47227 is a reply to message #47224] Thu, 29 December 2016 23:29 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 640
Registered: September 2012
Location: Poland, Kraków
Contributor
Hello,

I don't know it doesn't netter, but there is a lack of c++11 flag for gcc in upp.spec file. It should be added (line 169):
COMMON_CPP_OPTIONS = "-std=c++11";


Sincerely,
Klugier


Ultimate++ - one framework to rule them all.
Re: [fatal error:] on Centos 7 [message #47228 is a reply to message #47227] Thu, 29 December 2016 23:40 Go to previous messageGo to previous message
amrein is currently offline  amrein
Messages: 209
Registered: August 2008
Location: France
Experienced Member
Hi Klugier

With of without this flag, it will compile on Centos.
I don't know if this flag is mandatory. It just won't work on old distro when their gcc version doesn't support c++11.
If Mirek asks me to add it into the spec file, I will.

I already added this line in CLANG.bm because clang++ compiler support c++11 in every Linux distributions.
I know this flag is important when working on Upp source because Upp must be c++11 compatible.

[Updated on: Thu, 29 December 2016 23:47]

Report message to a moderator

Previous Topic: Can Ultimate++ be installed on Beaglebone Black running on Debian OS?
Next Topic: Can't compile U++ on most Linux distributions
Goto Forum:
  


Current Time: Wed Nov 20 05:25:43 CET 2019

Total time taken to generate the page: 0.01176 seconds