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 » Developing U++ » Mac OSX » Compile X11 Source Package
Compile X11 Source Package [message #25341] Wed, 17 February 2010 18:44 Go to next message
Reini is currently offline  Reini
Messages: 28
Registered: April 2009
Location: Berlin
Promising Member
Hello Mirek and others

I posted this already but hopefully it gets now more attention.

I am trying to compile the latest Source Package 2087 in OSX and get the following errors.

++ -c -O3 -ffunction-sections -fdata-sections  -x c++  -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 -DflagGUI -DflagGCC -DflagSHARED -DflagLINUX -DflagPOSIX -DflagMAIN  ide/SelectPkg.cpp -o _out/ide/GCCMK-Gcc-Gui-Linux-Main-Posix-Shared/SelectPkg.o
In file included from ./ide/Core/Core.h:5,
                 from ./ide/Common/Common.h:4,
                 from ide/ide.h:4,
                 from ide/SelectPkg.cpp:1:
./Web/Web.h:30:2: error: #error Unsupported platform
In file included from ./Web/Web.h:38,
                 from ./ide/Core/Core.h:5,
                 from ./ide/Common/Common.h:4,
                 from ide/ide.h:4,
                 from ide/SelectPkg.cpp:1:
./Web/socket.h:139:2: error: #error Unsupported platform
In file included from ./Core/Core.h:226,
                 from ./Esc/Esc.h:4,
                 from ./ide/Core/Core.h:4,
                 from ./ide/Common/Common.h:4,
                 from ide/ide.h:4,
                 from ide/SelectPkg.cpp:1:


I tried already to fix this in the Core/config.h file but did not work the way I wanted. So I will attach the file and hopefully Mirek or someone else can help out.
Here I have submitted also two links whre the exact informations are located.

http://stackoverflow.com/questions/1529031/what-c-preprocess or-conditional-should-i-use-for-os-x-specific-code/1529074

http://predef.sourceforge.net/preos.html#sec19

For sure in the Web.h there has to be done also a modification whre I didn't want to add some extra code unless I know exactly what would be the prefered way to do it.


Greetings Reini
  • Attachment: config.h
    (Size: 2.33KB, Downloaded 274 times)
Re: Compile X11 Source Package [message #25343 is a reply to message #25341] Wed, 17 February 2010 20:11 Go to previous messageGo to next message
andrei_natanael is currently offline  andrei_natanael
Messages: 262
Registered: January 2009
Experienced Member
I would start compiling Core first and after that i would add other packages to compilation. If you do your fixes progressively would be more simple.

Try this in config.h, starting with line 10:
	#if __unix || __unix__ || __APPLE__ 
		#define PLATFORM_POSIX 1
		
		#ifdef flagGUI
			#define PLATFORM_X11 1
		#endif
	
		#if __linux
			#define PLATFORM_LINUX 1
		#else
			#if __FreeBSD__ || __OpenBSD__ || __NetBSD__
				#define PLATFORM_BSD 1
				#if __FreeBSD__
					#define PLATFORM_FREEBSD 1
				#endif
				#if __OpenBSD__
					#define PLATFORM_OPENBSD 1
				#endif
				#if __NetBSD__
					#define PLATFORM_NETBSD 1
				#endif
			#elif __sun
				#define PLATFORM_SOLARIS 1
			#elif __APPLE__
				#define PLATFORM_MACOS 1
			#else
				#error Unknown OS
			#endif
		#endif
	#endif


I've considered MacOS as a posix platform. It should solve problems with Web package or maybe not, i don't have a mac so i can't test. Smile

Andrei

P.S: Please add some new lines to quoted errors in your previous post, it make easier for others to find "Submit Reply" button Wink without scrolling too much.
Re: Compile X11 Source Package [message #25452 is a reply to message #25343] Wed, 24 February 2010 13:06 Go to previous messageGo to next message
Reini is currently offline  Reini
Messages: 28
Registered: April 2009
Location: Berlin
Promising Member
Hello Andrei,

Sorry for the delayed answer I was busy last days.

I still get an error.

 In file included from ./Core/Core.h:37,
                 from ./Esc/Esc.h:4,
                 from ./ide/Core/Core.h:4,
                 from ./ide/Common/Common.h:4,
                 from ide/ide.h:4,
                 from ide/SelectPkg.cpp:1:
./Core/config.h:34:6: error: #error Unknown OS
make: *** [_out/ide/GCCMK-Gcc-Gui-Linux-Main-Posix-Shared/SelectPkg.o] Error 1
cp: uppsrc/ide.out: No such file or directory


I hope to find a solution soon.
Re: Compile X11 Source Package [message #25453 is a reply to message #25452] Wed, 24 February 2010 13:32 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Hi Reini,

what is the output of
echo | gcc -E -dM -
?

Matthias
Re: Compile X11 Source Package [message #25455 is a reply to message #25453] Wed, 24 February 2010 14:15 Go to previous messageGo to next message
Reini is currently offline  Reini
Messages: 28
Registered: April 2009
Location: Berlin
Promising Member
Hello Mathias,

I made it a step further and patched the config.h File.
There was a misplaced else section in there.

#if __unix || __unix__ || __APPLE__
    #define PLATFORM_POSIX 1
  
                  #ifdef flagGUI
                          #define PLATFORM_X11 1
                  #endif
  
                  #if __linux
                          #define PLATFORM_LINUX 1
                  #else
                          #if __FreeBSD__ || __OpenBSD__ || __NetBSD__
                                  #define PLATFORM_BSD 1
                                  #if __FreeBSD__
                                          #define PLATFORM_FREEBSD 1
                                  #endif
                                  #if __OpenBSD__
                                          #define PLATFORM_OPENBSD 1
                                  #endif
                                  #if __NetBSD__
                                          #define PLATFORM_NETBSD 1
                                  #endif
                          #elif __sun
                                  #define PLATFORM_SOLARIS 1
                          #endif
                  #endif
          #else
                  #error Unknown OS
          #endif


The next error is that libnotify and glibc are missing. I try to get further on that one.

Here is the output of the Defines. Wow nice compiler switch Smile

#define __DBL_MIN_EXP__ (-1021)
#define __FLT_MIN__ 1.17549435e-38F
#define __DEC64_DEN__ 0.000000000000001E-383DD
#define __CHAR_BIT__ 8
#define __WCHAR_MAX__ 2147483647
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __FLT_EVAL_METHOD__ 0
#define __DBL_MIN_10_EXP__ (-307)
#define __FINITE_MATH_ONLY__ 0
#define __DEC64_MAX_EXP__ 384
#define __SHRT_MAX__ 32767
#define __LDBL_MAX__ 1.18973149535723176502e+4932L
#define __APPLE_CC__ 5646
#define __UINTMAX_TYPE__ long unsigned int
#define __DEC32_EPSILON__ 1E-6DF
#define __block __attribute__((__blocks__(byref)))
#define __SCHAR_MAX__ 127
#define __USER_LABEL_PREFIX__ _
#define __STDC_HOSTED__ 1
#define __DEC64_MIN_EXP__ (-383)
#define __DBL_DIG__ 15
#define __FLT_EPSILON__ 1.19209290e-7F
#define __LDBL_MIN__ 3.36210314311209350626e-4932L
#define __DEC32_MAX__ 9.999999E96DF
#define __strong 
#define __APPLE__ 1
#define __DECIMAL_DIG__ 21
#define __LDBL_HAS_QUIET_NAN__ 1
#define __DYNAMIC__ 1
#define __GNUC__ 4
#define __MMX__ 1
#define __FLT_HAS_DENORM__ 1
#define __DBL_MAX__ 1.7976931348623157e+308
#define __DBL_HAS_INFINITY__ 1
#define __DEC32_MIN_EXP__ (-95)
#define OBJC_NEW_PROPERTIES 1
#define __LDBL_HAS_DENORM__ 1
#define __DEC32_MIN__ 1E-95DF
#define __weak __attribute__((objc_gc(weak)))
#define __DBL_MAX_EXP__ 1024
#define __DEC128_EPSILON__ 1E-33DL
#define __SSE2_MATH__ 1
#define __amd64 1
#define __tune_core2__ 1
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __GXX_ABI_VERSION 1002
#define __FLT_MIN_EXP__ (-125)
#define __x86_64 1
#define __DBL_MIN__ 2.2250738585072014e-308
#define __LP64__ 1
#define __DBL_HAS_QUIET_NAN__ 1
#define __DEC128_MIN__ 1E-6143DL
#define __REGISTER_PREFIX__ 
#define __DBL_HAS_DENORM__ 1
#define __NO_INLINE__ 1
#define __DEC_EVAL_METHOD__ 2
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __FLT_MANT_DIG__ 24
#define __VERSION__ "4.2.1 (Apple Inc. build 5646) (dot 1)"
#define __DEC64_EPSILON__ 1E-15DD
#define __DEC128_MIN_EXP__ (-6143)
#define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ 1062
#define __SIZE_TYPE__ long unsigned int
#define __DEC32_DEN__ 0.000001E-95DF
#define __FLT_RADIX__ 2
#define __LDBL_EPSILON__ 1.08420217248550443401e-19L
#define __SSE_MATH__ 1
#define __k8 1
#define __LDBL_DIG__ 18
#define __x86_64__ 1
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MAX_10_EXP__ 38
#define __LONG_MAX__ 9223372036854775807L
#define __FLT_HAS_INFINITY__ 1
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __DEC64_MANT_DIG__ 16
#define __DEC32_MAX_EXP__ 96
#define __DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL
#define __LITTLE_ENDIAN__ 1
#define __LDBL_MANT_DIG__ 64
#define __CONSTANT_CFSTRINGS__ 1
#define __DEC32_MANT_DIG__ 7
#define __k8__ 1
#define __WCHAR_TYPE__ int
#define __pic__ 2
#define __FLT_DIG__ 6
#define __INT_MAX__ 2147483647
#define __FLT_MAX_EXP__ 128
#define __BLOCKS__ 1
#define __DBL_MANT_DIG__ 53
#define __DEC64_MIN__ 1E-383DD
#define __WINT_TYPE__ int
#define __SSE__ 1
#define __LDBL_MIN_EXP__ (-16381)
#define __MACH__ 1
#define __amd64__ 1
#define __LDBL_MAX_EXP__ 16384
#define __SSP__ 1
#define __LDBL_MAX_10_EXP__ 4932
#define __DBL_EPSILON__ 2.2204460492503131e-16
#define _LP64 1
#define __GNUC_PATCHLEVEL__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __INTMAX_MAX__ 9223372036854775807L
#define __FLT_DENORM_MIN__ 1.40129846e-45F
#define __PIC__ 2
#define __FLT_MAX__ 3.40282347e+38F
#define __SSE2__ 1
#define __FLT_MIN_10_EXP__ (-37)
#define __INTMAX_TYPE__ long int
#define __DEC128_MAX_EXP__ 6144
#define __GNUC_MINOR__ 2
#define __DBL_MAX_10_EXP__ 308
#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
#define __STDC__ 1
#define __PTRDIFF_TYPE__ long int
#define __DEC128_MANT_DIG__ 34
#define __LDBL_MIN_10_EXP__ (-4931)
#define __GNUC_GNU_INLINE__ 1
#define __SSE3__ 1


Thanks for now !

[Updated on: Wed, 24 February 2010 14:15]

Report message to a moderator

Re: Compile X11 Source Package [message #25459 is a reply to message #25455] Wed, 24 February 2010 15:36 Go to previous messageGo to next message
andrei_natanael is currently offline  andrei_natanael
Messages: 262
Registered: January 2009
Experienced Member
Reini wrote on Wed, 24 February 2010 15:15


The next error is that libnotify and glibc are missing. I try to get further on that one.


Try compiling with flagNOGTK and get rid of complains about missing gtk+ related libs and libnotify.
Re: Compile X11 Source Package [message #25460 is a reply to message #25459] Wed, 24 February 2010 18:19 Go to previous messageGo to next message
Reini is currently offline  Reini
Messages: 28
Registered: April 2009
Location: Berlin
Promising Member
Hello Andrei,

I tried this way:

#if __unix || __unix__ || __APPLE__
                  #define PLATFORM_POSIX 1
                  #undef flagGUI
  
                  //#ifdef flagGUI
                  //      #define PLATFORM_X11 1
                  //#endif


This was then the result.

In file included from ./CtrlCore/CtrlCore.h:6,
                 from ./CtrlLib/CtrlLib.h:4,
                 from ./ide/Common/Common.h:5,
                 from ide/ide.h:4,
                 from ide/SelectPkg.cpp:1:
./CtrlCore/SystemDraw.h:32: error: invalid use of incomplete type ‘struct Upp::SystemDraw’
./Draw/Draw.h:13: error: forward declaration of ‘struct Upp::SystemDraw’
./CtrlCore/SystemDraw.h:72: error: invalid use of incomplete type ‘struct Upp::SystemDraw’
./Draw/Draw.h:13: error: forward declaration of ‘struct Upp::SystemDraw’
In file included from ./CtrlCore/CtrlCore.h:28,
                 from ./CtrlLib/CtrlLib.h:4,
                 from ./ide/Common/Common.h:5,
                 from ide/ide.h:4,
                 from ide/SelectPkg.cpp:1:
./CtrlCore/MKeys.h:14: error: ‘K_BACKSPACE’ was not declared in this scope
./CtrlCore/MKeys.h:15: error: ‘K_BACKSPACE’ was not declared in this scope
./CtrlCore/MKeys.h:16: error: ‘K_TAB’ was not declared in this scope
./CtrlCore/MKeys.h:17: error: ‘K_ENTER’ was not declared in this scope


The preferable way won't be to go without GTK. There are then several errors with all the keys.
Re: Compile X11 Source Package [message #25461 is a reply to message #25460] Wed, 24 February 2010 19:09 Go to previous messageGo to next message
andrei_natanael is currently offline  andrei_natanael
Messages: 262
Registered: January 2009
Experienced Member
L.E.: Seems config.h got fixed.
(Irrelevant post removed)

[Updated on: Thu, 25 February 2010 10:14]

Report message to a moderator

Re: Compile X11 Source Package [message #25656 is a reply to message #25461] Sat, 06 March 2010 15:23 Go to previous messageGo to next message
Reini is currently offline  Reini
Messages: 28
Registered: April 2009
Location: Berlin
Promising Member
Hello everybody,

Today I got the time to check again if I get a step further in compiling UPP on the Mac.

Meanwhile I installed with the macports all corresponding libs. (libnotify, gtk, freetype2 and all other dependencies.)

So here are the next errors Rolling Eyes

In file included from /opt/local/include/glib-2.0/glib/galloca.h:34,
                 from /opt/local/include/glib-2.0/glib.h:32,
                 from CtrlLib/TrayIconX11.cpp:8:
/opt/local/include/glib-2.0/glib/gtypes.h:34:24: error: glibconfig.h: No such file or directory
/opt/local/include/glib-2.0/glib/gtypes.h:410:2: error: #error unknown ENDIAN type
In file included from /opt/local/include/libnotify/notify.h:27,
                 from CtrlLib/TrayIconX11.cpp:9:
/opt/local/include/libnotify/notification.h:27:21: error: gtk/gtk.h: No such file or directory
/opt/local/include/libnotify/notification.h:91:22: error: missing binary operator before token "("
/opt/local/include/libnotify/notification.h:105:22: error: missing binary operator before token "("


I tried to set the search paths for GCC with the appropriate directories.

CPLUS_INCLUDE_PATH=/opt/local/include:/opt/local/include/glib-2.0:/opt/local/include/glib-2.0/include
C_INCLUDE_PATH=/opt/local/include:/opt/local/include/glib-2.0:/opt/local/include/glib-2.0/include


For the moment I don´t know how to continue...
If someone could help I would be happy.

Thanks in Advance !
Re: Compile X11 Source Package [message #25659 is a reply to message #25656] Sat, 06 March 2010 18:10 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11712
Registered: November 2005
Ultimate Member
libnotify is not required to run theide. I think you can patch it for now by deleting all references to it.

Maybe, the most straightforwared is to use NOGTK.
Re: Compile X11 Source Package [message #25666 is a reply to message #25341] Sun, 07 March 2010 01:37 Go to previous messageGo to next message
Reini is currently offline  Reini
Messages: 28
Registered: April 2009
Location: Berlin
Promising Member
Hello Mirek,

Thanks four your quick answer but that was not the preferable way to do it.

I made the next step in compiling now but only the linking fails. Unodgs helped me a bit out and I tried to patch the makefile but in the end the Mac uses a quite diffrent linking than Unix or Linux and I failed for today Confused

Anyway I think going on OSX for GTK is best the following way.

GTK-OSX http://sourceforge.net/projects/gtk-osx/files is the project on SF which keeps updated scripts for everything and uses a more "OS-X" like way in doing it.

My suggestion is also to update the build system since it's rather too complicated in staying this way we are at the moment. I would do a smaple script with premake since I think it is the most easy to understand and modern system out there.


Greets

[Updated on: Sun, 07 March 2010 01:43]

Report message to a moderator

Re: Compile X11 Source Package [message #25686 is a reply to message #25666] Sun, 07 March 2010 21:54 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
Hi Reini,

have you tried the Makefile provided here:
http://www.ultimatepp.org/forum/index.php?t=msg&th=4942& amp;start=0&
?

If you have GNU make available on OSX, you could try it since it could be the base for a general U++ Makefile.

Honza is also working on a version providing better package *.upp file parsing enhances my version quite a lot.

But the Makefile I provided should work for building TheIDE as is.

Matthias
Re: Compile X11 Source Package [message #29548 is a reply to message #25686] Thu, 28 October 2010 03:30 Go to previous message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hello,

I don't have a Mac so I can't test but I would get one if UPP supported development on that platform. Does it?

Nick
Previous Topic: MacOS ide make problem
Next Topic: CtrlCore on Mac - xcode files and video
Goto Forum:
  


Current Time: Sat Feb 23 07:39:40 CET 2019

Total time taken to generate the page: 0.01320 seconds