Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Building Code::Blocks on Win 64

<< < (5/15) > >>

Biplab:
Try the attached patch. You are right in saying that use of wxIntPtr is very tricky. It's not defined in wx-2.8. I'll modify affected codes.


--- Quote from: billyonthemountain on January 13, 2010, 12:35:58 am ---Compiling still fails here :

--- Code: ---../../../../src/include/scripting/sqplus/sqplus.h:1254: error: no matching function for call to ‘Call(wxColour&, bool (wxGDIObject::*&)()const, SQVM*&, int)’                                                                                                                                             
make[4]: *** [sc_wxtypes.lo] Error 1                                                                                                                 
make[4]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r23/work/codeblocks-9999/src/sdk/scripting/bindings'                           
make[3]: *** [all-recursive] Error 1                                                                                                                 
make[3]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r23/work/codeblocks-9999/src/sdk/scripting'                                   
make[2]: *** [all-recursive] Error 1                                                                                                                 
make[2]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r23/work/codeblocks-9999/src/sdk'                                             
make[1]: *** [all-recursive] Error 1                                                                                                                 
make[1]: Leaving directory `/var/tmp/portage/dev-util/codeblocks-9999-r23/work/codeblocks-9999/src'                                                 
make: *** [all-recursive] Error 1
--- End code ---
Using wx-2.9 svn on linux 64bit

--- End quote ---

I couldn't reproduce this on my 32 bit machine. Are you still getting this error?

[attachment deleted by admin]

billyonthemountain:
Here are my test results : (all done against revision 6083)


* Vanilla sources, wx-2.8.10, linux 64-bits : build succeeds
* With the latest patch, wx-2.8.10, linux 64-bits : build fails
--- Code: ---Making all in lexers                                                                                          
[...]            
make[3]: Entering directory `/home/paccolat/tmp/devel/codeblocks_linux64/trunk/src/sdk'                      
if /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../src/include -I../../src/include/wxscintilla/include -I../../src/include/tinyxml -I../../src/include/scripting/include -I../../src/include/scripting/sqplus -I../../src/include/mozilla_chardet  -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT nullptr.lo -MD -MP -MF ".deps/nullptr.Tpo" -c -o nullptr.lo nullptr.cpp; \                                                                                                                                      
        then mv -f ".deps/nullptr.Tpo" ".deps/nullptr.Plo"; else rm -f ".deps/nullptr.Tpo"; exit 1; fi                                              
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I. -I../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -I../../src/include -I../../src/include/wxscintilla/include -I../../src/include/tinyxml -I../../src/include/scripting/include -I../../src/include/scripting/sqplus -I../../src/include/mozilla_chardet -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT nullptr.lo -MD -MP -MF .deps/nullptr.Tpo -c nullptr.cpp  -fPIC -DPIC -o .libs/nullptr.o    
In file included from nullptr.cpp:10:                                                                                                                
../../src/include/prep.h:312: error: ‘size_t’ does not name a type                                                                                  
../../src/include/prep.h:314: error: expected ‘)’ before ‘in’                                                                                        
../../src/include/prep.h:317: error: ‘size_t’ has not been declared                                                                                  
../../src/include/prep.h:323: error: expected type-specifier before ‘size_t’                                                                        
../../src/include/prep.h: In constructor ‘ID::ID()’:                                                                                                
../../src/include/prep.h:321: error: class ‘ID’ does not have any field named ‘value’                                                                
../../src/include/prep.h:321: error: ‘size_t’ was not declared in this scope                                                                        
../../src/include/prep.h: In member function ‘ID::operator void*() const’:                                                                          
../../src/include/prep.h:324: error: ‘value’ was not declared in this scope                                                                          
../../src/include/prep.h: In member function ‘bool ID::Valid() const’:                                                                              
../../src/include/prep.h:326: error: ‘value’ was not declared in this scope                                                                          
../../src/include/prep.h:326: error: ‘size_t’ was not declared in this scope                                                                        
../../src/include/prep.h: In function ‘bool operator==(ID, ID)’:                                                                                    
../../src/include/prep.h:329: error: ‘class ID’ has no member named ‘value’                                                                          
../../src/include/prep.h:329: error: ‘class ID’ has no member named ‘value’                                                                          
../../src/include/prep.h: In function ‘bool operator==(ID, int)’:                                                                                    
../../src/include/prep.h:330: error: ‘class ID’ has no member named ‘value’
../../src/include/prep.h:330: error: ‘size_t’ was not declared in this scope
../../src/include/prep.h:330: error: expected ‘;’ before ‘b’
../../src/include/prep.h: In function ‘bool operator!=(ID, ID)’:
../../src/include/prep.h:332: error: ‘class ID’ has no member named ‘value’
../../src/include/prep.h:332: error: ‘class ID’ has no member named ‘value’
../../src/include/prep.h: In function ‘bool operator!=(ID, int)’:
../../src/include/prep.h:333: error: ‘class ID’ has no member named ‘value’
../../src/include/prep.h: In function ‘ID GetID()’:
../../src/include/prep.h:339: error: ‘size_t’ does not name a type
../../src/include/prep.h:340: error: ‘id’ was not declared in this scope
../../src/include/prep.h: At global scope:
../../src/include/prep.h:344: error: ‘ConstructID’ declared as an ‘inline’ variable
../../src/include/prep.h:344: error: ‘ID ConstructID’ redeclared as different kind of symbol
../../src/include/prep.h:317: error: previous declaration of ‘ID ConstructID(int)’
../../src/include/prep.h:344: error: ‘size_t’ was not declared in this scope
--- End code ---


* Vanilla sources, wx-2.9-svn, linux 64 : build fails
--- Code: ---Making all in bindings                                                                                                                              
make[4]: Entering directory `/home/paccolat/tmp/devel/codeblocks_linux64/trunk/src/sdk/scripting/bindings'                                          
if /bin/sh ../../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../../src/include -I../../../../src/include/wxscintilla/include -I../../../../src/include/scripting/include -I../../../../src/include/scripting/bindings -I../../../../src/include/scripting/sqplus  -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT sc_wxtypes.lo -MD -MP -MF ".deps/sc_wxtypes.Tpo" -c -o sc_wxtypes.lo sc_wxtypes.cpp; \                                                                                                          
        then mv -f ".deps/sc_wxtypes.Tpo" ".deps/sc_wxtypes.Plo"; else rm -f ".deps/sc_wxtypes.Tpo"; exit 1; fi                                      
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../../src/include -I../../../../src/include/wxscintilla/include -I../../../../src/include/scripting/include -I../../../../src/include/scripting/bindings -I../../../../src/include/scripting/sqplus -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT sc_wxtypes.lo -MD -MP -MF .deps/sc_wxtypes.Tpo -c sc_wxtypes.cpp  -fPIC -DPIC -o .libs/sc_wxtypes.o
In file included from ../../../../src/include/scripting/bindings/sc_base_types.h:26,
                 from sc_wxtypes.cpp:18:
../../../../src/include/scripting/sqplus/sqplus.h: In static member function ‘static SQInteger SqPlus::DirectCallInstanceMemberFunction<Callee, Func>::Dispatch(SQVM*) [with Callee = wxColour, Func = bool (wxGDIObject::*)()const]’:
../../../../src/include/scripting/sqplus/sqplus.h:1313:   instantiated from ‘void SqPlus::sq_pushdirectinstanceclosure(SQVM*, const Callee&, Func, SQUnsignedInteger) [with Callee = wxColour, Func = bool (wxGDIObject::*)()const]’
../../../../src/include/scripting/sqplus/sqplus.h:1397:   instantiated from ‘void SqPlus::RegisterInstance(SQVM*, HSQOBJECT, Callee&, Func, const SQChar*) [with Callee = wxColour, Func = bool (wxGDIObject::*)()const]’
../../../../src/include/scripting/sqplus/sqplus.h:1751:   instantiated from ‘SqPlus::SQClassDef<TClassType>& SqPlus::SQClassDef<TClassType>::func(Func, const SQChar*) [with Func = bool (wxGDIObject::*)()const, TClassType = wxColour]’
sc_wxtypes.cpp:223:   instantiated from here
../../../../src/include/scripting/sqplus/sqplus.h:1244: error: no matching function for call to ‘Call(wxColour&, bool (wxGDIObject::*&)()const, SQVM*&, int)’

--- End code ---


* With latest patch, wx-2.9-svn, linux 64 : build fails (same place as before)
--- Code: ---Making all in bindings                                                                                                                              
make[4]: Entering directory `/home/paccolat/tmp/devel/codeblocks_linux64/trunk/src/sdk/scripting/bindings'                                          
if /bin/sh ../../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../../src/include -I../../../../src/include/wxscintilla/include -I../../../../src/include/scripting/include -I../../../../src/include/scripting/bindings -I../../../../src/include/scripting/sqplus  -Ulinux -Uunix  -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT sc_wxtypes.lo -MD -MP -MF ".deps/sc_wxtypes.Tpo" -c -o sc_wxtypes.lo sc_wxtypes.cpp; \                                                                                                          
        then mv -f ".deps/sc_wxtypes.Tpo" ".deps/sc_wxtypes.Plo"; else rm -f ".deps/sc_wxtypes.Tpo"; exit 1; fi                                      
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.9 -I/usr/include/wx-2.9 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__ -pthread -I../../../../src/include -I../../../../src/include/wxscintilla/include -I../../../../src/include/scripting/include -I../../../../src/include/scripting/bindings -I../../../../src/include/scripting/sqplus -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -g -O2 -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -MT sc_wxtypes.lo -MD -MP -MF .deps/sc_wxtypes.Tpo -c sc_wxtypes.cpp  -fPIC -DPIC -o .libs/sc_wxtypes.o                                                                                                                                    
In file included from ../../../../src/include/scripting/bindings/sc_base_types.h:26,                                                                
                 from sc_wxtypes.cpp:18:                                                                                                            
../../../../src/include/scripting/sqplus/sqplus.h: In static member function ‘static SQInteger SqPlus::DirectCallInstanceMemberFunction<Callee, Func>::Dispatch(SQVM*) [with Callee = wxColour, Func = bool (wxGDIObject::*)()const]’:
../../../../src/include/scripting/sqplus/sqplus.h:1323:   instantiated from ‘void SqPlus::sq_pushdirectinstanceclosure(SQVM*, const Callee&, Func, SQUnsignedInteger) [with Callee = wxColour, Func = bool (wxGDIObject::*)()const]’
../../../../src/include/scripting/sqplus/sqplus.h:1407:   instantiated from ‘void SqPlus::RegisterInstance(SQVM*, HSQOBJECT, Callee&, Func, const SQChar*) [with Callee = wxColour, Func = bool (wxGDIObject::*)()const]’
../../../../src/include/scripting/sqplus/sqplus.h:1761:   instantiated from ‘SqPlus::SQClassDef<TClassType>& SqPlus::SQClassDef<TClassType>::func(Func, const SQChar*) [with Func = bool (wxGDIObject::*)()const, TClassType = wxColour]’
sc_wxtypes.cpp:223:   instantiated from here
../../../../src/include/scripting/sqplus/sqplus.h:1254: error: no matching function for call to ‘Call(wxColour&, bool (wxGDIObject::*&)()const, SQVM*&, int)’

--- End code ---

Looks like the patch still breaks the wx-2.8 build, wx-2.9 unaffected so far (wx-2.9 migration issue)
Hope it helps...

vityan:
C::B Build 6198
WxWidGets 2.91 SVN(31.03.2010)
MingW-W64 27.03.2010 Native Compiler(X64 -> X64) by sezero(Personal builds on MingW-W64 download section)


Status: SUCCESS build of native C::B X64 :)


Ok - I've worked on it 2 days(Don't afraid of post count of 1 post - I'm old happy C::B user and old C developer and building C::B/WxWidgets from source for more than year).


Let's start.

Prerequecities:

1)WxWidgets 2.91-SVN(Don't use nightly snapshots as they missing the Ribon subfolders in the archive)
2)My small fix-up for WxWidgets Source Code(One header file):
  include\wx\msw\listctrl.h
  
  Find:
   // Sets the item data
    bool SetItemPtrData(long item, wxUIntPtr data);
    bool SetItemData(long item, long data) { return SetItemPtrData(item, data); }

  Replace to:
     // Sets the item data
    bool SetItemPtrData(long item, wxUIntPtr data);
    bool SetItemData(long item, wxUIntPtr data) { return SetItemPtrData(item, data); }

3)C::B HEAD Source Code.
4)My Patch against C::B Source for Win-X64(The patch is very big and thus cannot be posted in the message body):
   http://pastebin.com/QjZW8n9G


5) Disable PCH in C::B Project settings(Remove CB_PRECOMP and WX_PRECOMP defines)

Now build it.

NOTE: I currently have one last problem with WxWidgets X64 library mislinking(ld link it with empty Export table i.e without symbols and thus the library is not usefull now. Ima working on this issue currently - Gonna try debug builds and as the last resort build static library).
I gonna inform here about the progress ;)

MortenMacFly:

--- Quote from: vityan on April 01, 2010, 01:55:23 pm ---Status: SUCCESS build of native C::B X64 :)

--- End quote ---
Although this is great news, please remember the following:
- there has already been done s lot work on this especially for the scripting engine
- both works should be merged
- your patch has a lot diffs due to white spaces and tabs which makes it hard to read
- please respect that as we in feature freeze there won't be much work on this atm (and only atm).
- please post this on the patch tracker, too therefore (probably after a clean-up concerning the white spaces).

vityan:
[MortenMacFly]


--- Quote ---- there has already been done s lot work on this especially for the scripting engine
--- End quote ---
I know - I view the list of changes commited by you,shahta and other active members and there are moves to X64 compatability.
Anyway there are still some work to be done.


--- Quote ---- both works should be merged
- your patch has a lot diffs due to white spaces and tabs which makes it hard to read

--- End quote ---

This is Tortoise's Diff fault :) The patch has some "dummy changes"(Then code wth "-" gets replaced with exactly same code with "+" sign).

The change set can be reduced drastically by fixing "Basic types overlap" bug in SCPlus.
In short:
scplus.h defines INT,BOOL and FLAT types but those are already defined in windef.h in MingW-W64. While INT type is 32 bit in MingW64 ScPlus enforces it to be 64 bit(shahta's workaround i think). While scplus.h has protect against inclusion of windef.h vice versa doesn't apply(windef.h ofc doesn't check for inclusion of scplus.h and tries to redefine the types).

After a lot of headaches with those ive made a clear decision that defined types SHOULD NEVER overlap with Compiler's internal type and thus(Using UltraEdit Find And Replace in Files) replaced all INT,BOOL and FLOAT in SCPlus(Header+Src) with non-conflicting safe types CBINT,CBBOOL,CBFLOAT. This change is the biggest part of the patch file(about 70-80%) while portability fixes are 5-9 patches(Pointers extensions to be 64 bit(I dont "shrink" pointers by casting - Thats not a way of porting) and some extensions to interface functions of some classes with work with different types of data - extended to work with long long type too(Maximum supported integer was long which is 32 bit integer)).


--- Quote ---- please respect that as we in feature freeze there won't be much work on this atm (and only atm).

--- End quote ---

I've read about it today and im glad that C::B finally reached the release point(Congrats about this grea event).
I know that such drastic changes will not enter trunk anytime soon but i wish you'r understanding that ppl will be able to apply a patch to official sources and run "X64" Edition unofficially until it will get merged(i suppose it will be changed a lot for merge :))


--- Quote ---- please post this on the patch tracker, too therefore (probably after a clean-up concerning the white spaces).

--- End quote ---

Ill do it then ill be able to build fully working C::B(Till now it is unable to run yet. Release builds of WxWidgets 2.91 are miscompiled resulting in invalid PE module and debug builds compiles better but causes codeblcoks.dll module to crash. Im currently trying static builds).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version