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 » Community » Newbie corner » Build debian package on Debian/kFreeBSD
Build debian package on Debian/kFreeBSD [message #41180] Fri, 08 November 2013 18:48 Go to next message
vicxtor is currently offline  vicxtor
Messages: 4
Registered: November 2013
Junior Member
Hello,

My OS is Debian/kFreeBSD 7.0.2.

Source packages are downloaded from http://upp.invothink.com/release/pool/main/u/upp/

When I build upp_5485-1~wheezy0 I got some error messages.


Using flags GUI GCC DEBUG DEBUG_FULL GNU/KFREEBSD POSIX

uppsrc/Core/config.h:45:6: error: #error Unknown OS


Could you help me to fix this issue ?

Thanks.
Re: Build debian package on Debian/kFreeBSD [message #41185 is a reply to message #41180] Sat, 09 November 2013 09:56 Go to previous messageGo to next message
vicxtor is currently offline  vicxtor
Messages: 4
Registered: November 2013
Junior Member
Hi all,

I chang some compile config,

1. upp_5485.orig.tar.gz

upp-x11-src-5485/uppsrc/Core/config.h L44 ~ L46

from

#else
#error Unknown OS
#endif

to

#else
#define PLATFORM_LINUX 1
#endif

2.upp_5485-1~wheezy0.debian.tar.gz

debian/patches/debian-changes-5485-1~sid0

L402
from
@@ -0,0 +1,378 @@
to
@@ -0,0 +1,382 @@

L466 add 4 lines
+INCPATHS+= /usr/lib/i386-kfreebsd-gnu/glib-2.0/include
+INCPATHS+= /usr/lib/x86_64-kfreebsd-gnu/glib-2.0/include
+INCPATHS+= /usr/lib/i386-kfreebsd-gnu/gtk-2.0/include
+INCPATHS+= /usr/lib/x86_64-kfreebsd-gnu/gtk-2.0/include

3.
dpkg-source --no-check -x upp_5485-1~wheezy0.dsc
cd upp-5485
dpkg-buildpackage -rfakeboot -b

all files compiled successfully but have link errors

Linking /home/fenix/Downloads/upp-5485/ide
_out/Draw/DEBUG.DEBUG_FULL.GCC.GNU/KFREEBSD.GUI.POSIX/Draw.a (FontFc.cpp.o): In function `Upp::sInitFt()':
/home/fenix/Downloads/upp-5485/uppsrc/Draw/FontFc.cpp:24: undefined reference to `FT_Init_FreeType'
_out/Draw/DEBUG.DEBUG_FULL.GCC.GNU/KFREEBSD.GUI.POSIX/Draw.a (FontFc.cpp.o): In function `Upp::CreateFcPattern(Upp::Font)':
/home/fenix/Downloads/up_out/CtrlCore/DEBUG.DEBUG_FULL.GCC.G NU/KFREEBSD.GUI.POSIX/CtrlCore.a(DrawX11.cpp.o): In function `Upp::InitX11Draw(char const*)':
/home/fenix/Downloads/upp-5485/uppsrc/CtrlCore/DrawX11.cpp:2 37: undefined reference to `gtk_init'
/home/fenix/Downloads/upp-5485/uppsrc/CtrlCore/DrawX11.cpp:2 38: undefined reference to `gtk_window_new'
/home/fenix/Downloads/upp-5485/uppsrc/CtrlCore/DrawX11.cpp:2 39: undefined reference to `gtk_widget_get_display'
/home/fenix/Downloads/upp-5485/uppsrc/CtrlCore/DrawX11.cpp:2 40: undefined reference to `gdk_x11_display_get_xdisplay'
p-5485/uppsrc/Draw/FontFc.cpp:33: undefined reference to `FcPatternCreate'
/home/fenix/Downloads/upp-5485/uppsrc/Draw/FontFc.cpp:34: undefined reference to `FcPatternAddString'
/home/fenix/Downloads/upp-5485/uppsrc/Draw/FontFc.cpp:35: undefined reference to `FcPatternAddInteger'

_out/CtrlCore/DEBUG.DEBUG_FULL.GCC.GNU/KFREEBSD.GUI.POSIX/Ct rlCore.a(DrawTextX11.cpp.o): In function `Upp::GetXftFont(Upp::Font, int)':
/home/fenix/Downloads/upp-5485/uppsrc/CtrlCore/DrawTextX11.c pp:96: undefined reference to `XftFontClose'
_out/CtrlCore/DEBUG.DEBUG_FULL.GCC.GNU/KFREEBSD.GUI.POSIX/Ct rlCore.a(DrawTextX11.cpp.o): In function `Upp::XftGetFontInfoSys(Upp::Font)':
/home/fenix/Downloads/upp-5485/uppsrc/CtrlCore/DrawTextX11.c pp:124: undefined reference to `FcPatternGetString'
_out/CtrlCore/DEBUG.DEBUG_FULL.GCC.GNU/KFREEBSD.GUI.POSIX/Ct rlCore.a(DrawTextX11.cpp.o): In function `Upp::XftGetGlyphInfoSys(Upp::Font, int)':
/home/fenix/Downloads/upp-5485/uppsrc/CtrlCore/DrawTextX11.c pp:135: undefined reference to `XftTextExtents16'

many similar messages like above.
libs are in /usr/lib/x86_64-kfreebsd-gnu

Do you know how to fix these issues ?

Thanks.
Re: Build debian package on Debian/kFreeBSD [message #41191 is a reply to message #41185] Sun, 10 November 2013 18:00 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi vicxtor

First of all, welcome to the forum Cool

Second, congratulations on being (probably) the first user ever to try U++ on Debian/kfreebsd Smile

Starting with the source packages as you did was a good idea. The problem is, that Debian/kfreebsd is somewhat on the edge of two platforms. Both Linux and FreeBSD are supported, but their combination as it is in Debian/kfreebsd might be little tricky for the configuration.

vicxtor wrote on Sat, 09 November 2013 09:56

Hi all,

I chang some compile config,

1. upp_5485.orig.tar.gz

upp-x11-src-5485/uppsrc/Core/config.h L44 ~ L46

from

#else
#error Unknown OS
#endif

to

#else
#define PLATFORM_LINUX 1
#endif

As a quick fix it is ok, but we should fix it in proper way Smile Something like this should work:
			#elif __FreeBSD_kernel__ && __GLIBC__
				#define PLATFORM_LINUX 1
			#else
				#error Unknown OS
			#endif


vicxtor wrote on Sat, 09 November 2013 09:56

2.upp_5485-1~wheezy0.debian.tar.gz

debian/patches/debian-changes-5485-1~sid0

L402
from
@@ -0,0 +1,378 @@
to
@@ -0,0 +1,382 @@

L466 add 4 lines
+INCPATHS+= /usr/lib/i386-kfreebsd-gnu/glib-2.0/include
+INCPATHS+= /usr/lib/x86_64-kfreebsd-gnu/glib-2.0/include
+INCPATHS+= /usr/lib/i386-kfreebsd-gnu/gtk-2.0/include
+INCPATHS+= /usr/lib/x86_64-kfreebsd-gnu/gtk-2.0/include

This seems ok and should work as expected.

vicxtor wrote on Sat, 09 November 2013 09:56

3.
dpkg-source --no-check -x upp_5485-1~wheezy0.dsc
cd upp-5485
dpkg-buildpackage -rfakeboot -b

all files compiled successfully but have link errors

Linking /home/fenix/Downloads/upp-5485/ide
_out/Draw/DEBUG.DEBUG_FULL.GCC.GNU/KFREEBSD.GUI.POSIX/Draw.a (FontFc.cpp.o): In function `Upp::sInitFt()':
/home/fenix/Downloads/upp-5485/uppsrc/Draw/FontFc.cpp:24: undefined reference to `FT_Init_FreeType'
_out/Draw/DEBUG.DEBUG_FULL.GCC.GNU/KFREEBSD.GUI.POSIX/Draw.a (FontFc.cpp.o): In function `Upp::CreateFcPattern(Upp::Font)':
/home/fenix/Downloads/up_out/CtrlCore/DEBUG.DEBUG_FULL.GCC.G NU/KFREEBSD.GUI.POSIX/CtrlCore.a(DrawX11.cpp.o): In function `Upp::InitX11Draw(char const*)':
/home/fenix/Downloads/upp-5485/uppsrc/CtrlCore/DrawX11.cpp:2 37: undefined reference to `gtk_init'
/home/fenix/Downloads/upp-5485/uppsrc/CtrlCore/DrawX11.cpp:2 38: undefined reference to `gtk_window_new'
/home/fenix/Downloads/upp-5485/uppsrc/CtrlCore/DrawX11.cpp:2 39: undefined reference to `gtk_widget_get_display'
/home/fenix/Downloads/upp-5485/uppsrc/CtrlCore/DrawX11.cpp:2 40: undefined reference to `gdk_x11_display_get_xdisplay'
p-5485/uppsrc/Draw/FontFc.cpp:33: undefined reference to `FcPatternCreate'
/home/fenix/Downloads/upp-5485/uppsrc/Draw/FontFc.cpp:34: undefined reference to `FcPatternAddString'
/home/fenix/Downloads/upp-5485/uppsrc/Draw/FontFc.cpp:35: undefined reference to `FcPatternAddInteger'

_out/CtrlCore/DEBUG.DEBUG_FULL.GCC.GNU/KFREEBSD.GUI.POSIX/Ct rlCore.a(DrawTextX11.cpp.o): In function `Upp::GetXftFont(Upp::Font, int)':
/home/fenix/Downloads/upp-5485/uppsrc/CtrlCore/DrawTextX11.c pp:96: undefined reference to `XftFontClose'
_out/CtrlCore/DEBUG.DEBUG_FULL.GCC.GNU/KFREEBSD.GUI.POSIX/Ct rlCore.a(DrawTextX11.cpp.o): In function `Upp::XftGetFontInfoSys(Upp::Font)':
/home/fenix/Downloads/upp-5485/uppsrc/CtrlCore/DrawTextX11.c pp:124: undefined reference to `FcPatternGetString'
_out/CtrlCore/DEBUG.DEBUG_FULL.GCC.GNU/KFREEBSD.GUI.POSIX/Ct rlCore.a(DrawTextX11.cpp.o): In function `Upp::XftGetGlyphInfoSys(Upp::Font, int)':
/home/fenix/Downloads/upp-5485/uppsrc/CtrlCore/DrawTextX11.c pp:135: undefined reference to `XftTextExtents16'

many similar messages like above.
libs are in /usr/lib/x86_64-kfreebsd-gnu

Do you know how to fix these issues ?


This is probably related to fontconfig. I'm not sure what exactly might be the problem, but I'd suggest to try compiling theide without it. There is actually already package that does this. It is called theide-nogtk, but the dpkg-buildpackage probably fails before it gets so far. Can you try to remove sections of debian/control that correspond to packages theide and theide-dbg? The rest might compile just fine...

Also, the flags detected by the makefile are not quite correct. Not sure if that makes some difference, but it might. You can fix them by adding PLATFORM=LINUX to the compiler lines in makefile:
ide:
	sed -i -e 's/IDE_VERSION[ \t]*"\([0-9]*\)[^"]*"/IDE_VERSION    "\1-'$(SERIES)-$(ARCH)'"/' $(CURDIR)/uppsrc/ide/version.h
	$(MAKE) -f mkfile JOBS=$(JOBS) PKG=ide "NESTS=uppsrc" $(OPTS) "FLAGS=GUI GCC DEBUG DEBUG_FULL" TARGET=`pwd`/$@  PLATFORM=LINUX

ide-nogtk:
	sed -i -e 's/IDE_VERSION[ \t]*"\([0-9]*\)[^"]*"/IDE_VERSION    "\1-'$(SERIES)-$(ARCH)'-nogtk"/' $(CURDIR)/uppsrc/ide/version.h
	$(MAKE) -f mkfile JOBS=$(JOBS) PKG=ide "NESTS=uppsrc" $(OPTS) "FLAGS=GUI NOGTK GCC" TARGET=`pwd`/$@  PLATFORM=LINUX

umk:
	$(MAKE) -f mkfile JOBS=$(JOBS) PKG=umk "NESTS=uppsrc" $(OPTS) "FLAGS=GCC" TARGET=`pwd`/$@ PLATFORM=LINUX


Hope this helps... If not, let me know what else needs to be fixed Wink

Best regards,
Honza
Re: Build debian package on Debian/kFreeBSD [message #41207 is a reply to message #41191] Tue, 12 November 2013 18:30 Go to previous messageGo to next message
vicxtor is currently offline  vicxtor
Messages: 4
Registered: November 2013
Junior Member
Quote:

Also, the flags detected by the makefile are not quite correct. Not sure if that makes some difference, but it might. You can fix them by adding PLATFORM=LINUX to the compiler lines in makefile:
ide:
	sed -i -e 's/IDE_VERSION[ \t]*"\([0-9]*\)[^"]*"/IDE_VERSION    "\1-'$(SERIES)-$(ARCH)'"/' $(CURDIR)/uppsrc/ide/version.h
	$(MAKE) -f mkfile JOBS=$(JOBS) PKG=ide "NESTS=uppsrc" $(OPTS) "FLAGS=GUI GCC DEBUG DEBUG_FULL" TARGET=`pwd`/$@  PLATFORM=LINUX

ide-nogtk:
	sed -i -e 's/IDE_VERSION[ \t]*"\([0-9]*\)[^"]*"/IDE_VERSION    "\1-'$(SERIES)-$(ARCH)'-nogtk"/' $(CURDIR)/uppsrc/ide/version.h
	$(MAKE) -f mkfile JOBS=$(JOBS) PKG=ide "NESTS=uppsrc" $(OPTS) "FLAGS=GUI NOGTK GCC" TARGET=`pwd`/$@  PLATFORM=LINUX

umk:
	$(MAKE) -f mkfile JOBS=$(JOBS) PKG=umk "NESTS=uppsrc" $(OPTS) "FLAGS=GCC" TARGET=`pwd`/$@ PLATFORM=LINUX


Hope this helps... If not, let me know what else needs to be fixed Wink

Best regards,
Honza


This fix is correct.

I modify the patch debian-changes-5485-1~sid0
from
+PLATFORM:=`uname | tr a-z A-Z` POSIX
to
+PLATFORM:=`uname | tr a-z A-Z` LINUX POSIX

then all files compiled successfully and all .debs generated.

Install and run some GUI tutorials without problems.

Tested on Debian/kFreeBSD 7 i386 & amd64.

Thank you very much. Very Happy
Re: Build debian package on Debian/kFreeBSD [message #41208 is a reply to message #41207] Tue, 12 November 2013 19:54 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

vicxtor wrote on Tue, 12 November 2013 18:30

Install and run some GUI tutorials without problems.

Tested on Debian/kFreeBSD 7 i386 & amd64.

Thank you very much. Very Happy

That's great news! Very Happy

I'll try to incorporate it into the Makefile, so you don't have to modify the deb manually next time.

Enjoy the coding with U++!
Honza
Previous Topic: ultimate++ is a source only library?
Next Topic: Problem with IMCENUMPROC
Goto Forum:
  


Current Time: Thu Mar 28 12:48:36 CET 2024

Total time taken to generate the page: 0.01434 seconds