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++ » Bugs (& fixes) » Problem with FreeBSD
Problem with FreeBSD [message #47093] Fri, 02 December 2016 10:04 Go to next message
lovmy is currently offline  lovmy
Messages: 40
Registered: November 2015
Member

I copied the MyApp directory of a windows under FreeBSD 11.0 and when I compile I have the following error:

Error: 'abs' is missing exception specification 'throw ()'

(see abs.png)

On Windows everything works.

Can you help me ?
  • Attachment: abs.png
    (Size: 177.23KB, Downloaded 137 times)
Re: Problem with FreeBSD [message #47095 is a reply to message #47093] Sat, 03 December 2016 10:33 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 916
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Which U++ version are you using?
I'm using it with clang under FreeBSD 10 without any problems.
Re: Problem with FreeBSD [message #47105 is a reply to message #47093] Wed, 07 December 2016 10:27 Go to previous messageGo to next message
lovmy is currently offline  lovmy
Messages: 40
Registered: November 2015
Member

Hi,

I have upgraded my FreeBSD from 10.1 to 11.0, this is my actual version:

FreeBSD freebsd 11.0-RELEASE-p2 FreeBSD 11.0-RELEASE-p2 #0:
Mon Oct 24 06:55:27 UTC 2016
root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64

I'm using UPP version 9251 (64 bit) (Gtk) compiled 12/03/ 16 07:41:40.

I have created project under Windows and i try to compile it on FreeBSD.

I have removed and upgraded my packages (pkg update && pkg upgrade) and reinstall app "upp" but i have still the same error.

Just i'm using GCC to compile, but i have same error with CLANG.

Thank you for your help.
  • Attachment: erreur.png
    (Size: 164.82KB, Downloaded 98 times)

[Updated on: Wed, 07 December 2016 10:32]

Report message to a moderator

Re: Problem with FreeBSD [message #47107 is a reply to message #47105] Wed, 07 December 2016 12:23 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 657
Registered: September 2012
Location: Poland, Kraków
Contributor
Hello,

Please try to use nightly instead of stable build and let me know the issue is reproducible.

I am pretty sure that we fixed that issue.

Sincerely,
Klugier


Ultimate++ - one framework to rule them all.
Re: Problem with FreeBSD [message #47108 is a reply to message #47093] Wed, 07 December 2016 13:26 Go to previous messageGo to next message
lovmy is currently offline  lovmy
Messages: 40
Registered: November 2015
Member

Hi,

i have trying to compile the nightly source but i have a error (see image).

Best regards.
  • Attachment: erreur.png
    (Size: 47.71KB, Downloaded 144 times)
Re: Problem with FreeBSD [message #47113 is a reply to message #47108] Fri, 09 December 2016 11:56 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 657
Registered: September 2012
Location: Poland, Kraków
Contributor
Hello,

I see Sender Ghost proposted fix for that issue in following thread. You can try his solution and let us know - if it works for you. We will try to fix that compilation issues as fast as possible.

Sincerely,
Klugier


Ultimate++ - one framework to rule them all.
Re: Problem with FreeBSD [message #47114 is a reply to message #47113] Fri, 09 December 2016 16:41 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Hello.

Klugier wrote on Fri, 09 December 2016 10:56

I see Sender Ghost proposed fix for that issue in following thread.

The mentioned link is for different purpose (about update to nightly version of devel/upp port and some (experimental) port for umk utility). But probably it may work.

I can't reproduce this issue about "illegal date format" on FreeBSD 10.2. Also, according to PortsMon page for devel/upp port, the current 9251 release revision builds fine on FreeBSD 11 (because of available 110amd64-default and 110i386-default packages). There were no related differences for build_info stage (except bmSVN_REVISION change) in uppsrc/Makefile.in file between 9251 and 10528 revisions (which is not an issue):
@@ -104,7 +104,7 @@
 	'#define bmTIME    Time(%y, %-m, %-d, %-H, %-M, %-S)' > build_info.h
 	echo '#define bmMACHINE "'`hostname`'"' >> build_info.h
 	echo '#define bmUSER    "'`whoami`'"' >> build_info.h
-	echo '#define bmSVN_REVISION "9251"' >> build_info.h
+	echo '#define bmSVN_REVISION "10528"' >> build_info.h
 	echo '#define bmSVN_URL "svn://www.ultimatepp.org/upp/trunk/uppsrc/ide"' >> build_info.h
 
 .PHONY: prepare

The issue about abs was fixed for 9251 release revision in devel/upp port. It was fixed with using patch in a link. The mentioned patch didn't apply for 10528 revision and was removed in current version of devel/upp-nightly port (because related code for abs was removed in 39d7888 (9828 revision) and 7f2eb48 (9829 revision) commits).

[Updated on: Fri, 09 December 2016 16:47]

Report message to a moderator

Re: Problem with FreeBSD [message #47121 is a reply to message #47114] Thu, 15 December 2016 00:11 Go to previous messageGo to next message
Mindtraveller is currently offline  Mindtraveller
Messages: 916
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

Recently I've made fresh FreeBSD 11.0 installation. Exported my nightly-U++ based project with Makefile and tried to build it.
And finally I must say it really gives build error:
date '+#define bmYEAR    %y%n' '#define bmMONTH   %-m%n' '#define bmDAY     %-d%n' '#define bmHOUR    %-H%n' '#define bmMINUTE  %-M%n' '#define bmSECOND  %-s%n' '#define bmTIME    Time(%y, %-m, %-d, %-H, %-M, %-s)' > build_info.h
date: illegal time format
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
            [-f fmt date | [[[[[cc]yy]mm]dd]HH]MM[.ss]] [+format]
*** Error code 1

Stop.

Is there any solution? I was unable to find one from the discussion above.

[Updated on: Thu, 15 December 2016 06:16]

Report message to a moderator

Re: Problem with FreeBSD [message #47124 is a reply to message #47121] Thu, 15 December 2016 13:43 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Mindtraveller wrote on Wed, 14 December 2016 23:11
Recently I've made fresh FreeBSD 11.0 installation. Exported my nightly-U++ based project with Makefile and tried to build it.
And finally I must say it really gives build error
...
Is there any solution? I was unable to find one from the discussion above.

The possible solution is to use gmake (from devel/gmake port) instead of make command to build exported U++ project with Makefile (on FreeBSD, at least). The same used in devel/upp FreeBSD port.

I reproduced mentioned issue on FreeBSD 10.2 with using make command. If comment the contents of build_info target in Makefile, then possible to use make command. Probably, some kind of GNU extension(s) was used in build_info target (Edit: this were quotes (') and unescaped characters (e.g. try to run `date '+#define bmYEAR %y%n' '#define bmMONTH %-m'` in console)).

Also, the build_info target is not thread-safe (i.e., not possible to use parallel builds, e.g. `gmake -j 2` command). There are some (sed) patches for uppsrc/Makefile(.in) in devel/upp-nightly port, which fixes this. For example:
sed -i '.bak' -e 's|^build_info|&.h| ; /^prepare/s| build_info|| ; s|^$(OutFile): |&build_info.h|' Makefile

The possible correct solution is to fix TheIDE source code, which related to exported Makefile.

[Updated on: Wed, 21 December 2016 00:14]

Report message to a moderator

Re: Problem with FreeBSD [message #47144 is a reply to message #47124] Wed, 21 December 2016 00:19 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
I fixed some mentioned issues (the patch attached, based on 10260 revision of uppsrc/ide/Builders/Build.cpp file):
1) Compatibility of build_info target for (BSD) make command:
- Remove usage of many quotes (') and unescaped characters for date command
(e.g. try to run `date '+#define bmYEAR %y%n' '#define bmMONTH %-m'` in console)

2) Parallel build:
- Add "build_info" target as first dependency to $(OutFile), instead of "prepare" target

Also I added following changes:
- Creation of build_info.h file as atomic operation
- Add removal of available build_info.h file for clean target

Overall, this allows to use parallel build with using make command. For example: make -j3

There is other possible issue, related to usage of theide/umk compiled before 9813 revision for export of U++ project(s), which uses C++11 features. There is a patch in 9813 revision (c4fa531) for this. Manual solution is to add -std=c++0x (or other) to CXXFLAGS of generated Makefile.

Edit: The attached patch was applied in 10564 revision (da2eaf7).
  • Attachment: uppsrc.diff
    (Size: 1.66KB, Downloaded 77 times)

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

Report message to a moderator

Re: Problem with FreeBSD [message #47260 is a reply to message #47144] Mon, 02 January 2017 04:50 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
There is another issue for exported Makefile, but this is not FreeBSD specific and may depend from contents of exported project. For example, based on exported uppsrc/ide project:
$ umk uppsrc ide CLANG -rsX ~/ide
<...>
$ cd ~/ide
$ gmake
<...>
gmake: *** No rule to make target 'Turtle/FB.iml', needed by '_out/ide/CLANG-Bsd-Clang-Freebsd-Gui-Main-Mt-Posix-Shared/BaseDlg.o'.  Stop.
The possible cause of this issue is usage of following code in uppsrc/CtrlCore/CtrlCore.h file:
	#ifdef flagTURTLE
		#define GUIPLATFORM_KEYCODES_INCLUDE <Turtle/Keys.h>
		//need to make SDL_keysym.h known before K_ enum
		#define GUIPLATFORM_INCLUDE          <Turtle/Turtle.h>

where current HdependGetDependencies method in uppsrc/ide/Builders/MakeFile.cpp file may add Turtle/FB.iml (and other files in uppsrc/Turtle directory) as dependency for some rule(s) in exported Makefile, independent from list of exported files and/or used compiler flags (which may be related to (simplified) preprocessor parser).

This issue possible to reproduce for unused parts of source code, which contains include(s) to existing file(s) in assembly directories, but which are not exported (e.g. in case of no related U++ project's dependency). For example, usage of following code, but without GLCtrl dependency in a U++ project:
#if 0
	#include <GLCtrl/GLCtrl.h>
#endif

The manual solution is to comment/remove such parts of source code (before export) or copy such directory/file(s) to directory of exported project.

Personally, I created another solution (based on some information from following topics: "Autodependencies with GNU make", "Auto-Dependency Generation", "Preprocessor Options"), which adds additional C/C++ compiler options in the process of Makefile's generation, related to creation of compiler generated file(s) with dependency information (as a side-effect of compilation). The patch attached (based on 9813 revision of uppsrc/ide/Builders/MakeFile.cpp file). This was tested for Clang 3.4.1, 3.9.1 and GCC 4.9.4 on FreeBSD 10.2.

[Updated on: Mon, 02 January 2017 06:45]

Report message to a moderator

Re: Problem with FreeBSD [message #47307 is a reply to message #47144] Tue, 03 January 2017 13:40 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 272
Registered: August 2008
Location: France
Experienced Member
Hi

In a fresh untared U++ tarball directory, even after running the sed commands found in 'domake' and if I run 'make -j8 -C uppsrc', it won't work.
You still need to run 'make prepare -C uppsrc' first. It's because of missing directories created by the prepare step.

If you run 'make -j8' in upp root, it won't use parallel build. Indeed, the root Makefile call domake and the current domake script doesn't use the -jn parameter.

If you don't understand what I mean than run:
cp domake domake.backup
sed -i -e 's|make -C uppsrc|make -j8 -C uppsrc|g' domake
make clean
make
Re: Problem with FreeBSD [message #47318 is a reply to message #47307] Wed, 04 January 2017 09:12 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
amrein wrote on Tue, 03 January 2017 12:40
You still need to run 'make prepare -C uppsrc' first

This is different issue, which you probably encountered with running many threads, while no directories created in prepare step, but some file was built first.

I guess, possible to fix this issue with addition of dependencies to prepare rule on directories to create. For example, based on uppsrc/umk:
Some example

I attached a patch (based on 10617 revision of uppsrc/ide/Builders/Build.cpp file), which adds this for exported Makefile.

How to apply the patch, just in case:
$ cd path/to/upp
$ patch -B '' < uppsrc_prepare_r10617.diff
You may need to rebuild uppsrc/umk or uppsrc/ide and do your own export/build to test this patch.

[Updated on: Wed, 04 January 2017 09:17]

Report message to a moderator

Re: Problem with FreeBSD [message #47345 is a reply to message #47318] Thu, 05 January 2017 16:00 Go to previous message
amrein is currently offline  amrein
Messages: 272
Registered: August 2008
Location: France
Experienced Member
Thank. Tested and applied.
Previous Topic: Since Raspberry have not RTC clock, I propose add SetTime functionality
Next Topic: int64 in JSON
Goto Forum:
  


Current Time: Thu Jun 04 07:00:02 CEST 2020

Total time taken to generate the page: 0.05868 seconds