Author Topic: FreeBSD and autorevision  (Read 6538 times)

sethjackson

  • Guest
FreeBSD and autorevision
« on: November 29, 2006, 07:30:39 pm »
Ok so C::B started compiling on FreeBSD, but I have some problems with autorevision which prevents me from compiling C::B.

See here.

Code
In file included from configmanager-revision.cpp:13:
autorevision.h:14: error: `encoding' was not declared in this scope
autorevision.h:14: error: expected primary-expression before '>' token
autorevision.h:14: error: expected primary-expression before ';' token
autorevision.h:14: error: expected `:' before ';' token
autorevision.h:14: error: expected primary-expression before ';' token
autorevision.h:15: error: expected `)' before "utf"
configmanager-revision.cpp: In static member function `static wxString ConfigManager::GetRevisionString()':
configmanager-revision.cpp:17: error: expected primary-expression before '(' token
configmanager-revision.cpp:17: error: expected `)' before "utf"

Here is autorevision.h

Code
/*encoding="utf-8"?>*/
#ifndef AUTOREVISION_H
#define AUTOREVISION_H


#include <wx/string.h>

#define SVN_REVISION "encoding="utf-8"?>"

#define SVN_DATE     "<entry"

namespace autorevision
{
const unsigned int svn_revision = encoding="utf-8"?>;
const wxString svnRevision(_T("encoding="utf-8"?>"));
}



#endif

Anyone have this problem? Afb?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: FreeBSD and autorevision
« Reply #1 on: November 29, 2006, 07:41:12 pm »
I confirm this problem.

I tried to compile code downloaded from svn. I faced the similar errors. Later I cleaned few times and restarted the build and it got compiled. I think it was svn 3291.  :?  Though the problem got solved but I'm not sure how it got solved!!

I was compiling Code::Blocks on Windows XP SP2, GCC 3.4.5 (MinGW Build).
Be a part of the solution, not a part of the problem.

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: FreeBSD and autorevision
« Reply #2 on: November 29, 2006, 07:44:10 pm »
I compiled Code::Blocks on FreeBSD by disabling autorevision in the Makefiles.
It just has the same problems that it has on all other platforms, so it'll be fixed...


sethjackson

  • Guest
Re: FreeBSD and autorevision
« Reply #3 on: November 29, 2006, 07:44:46 pm »
Ok I don't know how to do that though. LOL
« Last Edit: November 29, 2006, 07:50:09 pm by sethjackson »

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: FreeBSD and autorevision
« Reply #4 on: November 29, 2006, 07:47:41 pm »
http://developer.berlios.de/patch/?func=detailpatch&patch_id=1604&group_id=5358

I have a better patch in the works, that uses autotools to generate autorevision.h
It will also fix the "revision is always zero when I compile from a tarball" problem.
« Last Edit: November 29, 2006, 07:50:14 pm by afb »

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: FreeBSD and autorevision
« Reply #5 on: November 29, 2006, 07:54:29 pm »
Ok I don't know how to do that though. LOL

I just hacked it out in the generated Makefile, and then edited src/sdk/autorevision.h by hand.

Code: src/build_tools/autorevision/makefile
all-local: auto_revision
#./auto_revision +int +wx +t $(top_srcdir) $(srcdir)/../../sdk/autorevision.h

The Fedora Extras package does the same thing. We really need to fix autorevision soon.

sethjackson

  • Guest
Re: FreeBSD and autorevision
« Reply #6 on: November 29, 2006, 08:09:52 pm »
Thanks. I just looked in that Makefile. Guess I didn't look hard enough. :P