Opened 7 years ago

Closed 19 months ago

#54395 closed defect (fixed)

codeblocks: needs C++11

Reported by: mojca (Mojca Miklavec) Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mf2k (Frank Schima)
Port: codeblocks

Description

Codeblocks currently fails to build without C++11 compiler:

/usr/bin/clang++ -std=c++11 -DHAVE_CONFIG_H  -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/wx/include/osx_cocoa-unicode-3.0 -I/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__  -I../../src/include -I../../src/include -I../../src/sdk/wxscintilla/include -I../../src/include/scripting/sqplus -I../../src/include/mozilla_chardet -I../../src/include/mozilla_chardet/mfbt -I../../src/include/mozilla_chardet/nsprpub/pr/include -I../../src/include/mozilla_chardet/xpcom -I../../src/include/mozilla_chardet/xpcom/base -I../../src/include/mozilla_chardet/xpcom/glue -DCB_AUTOCONF -I/opt/local/include -DCB_PRECOMP -DPIC -I../../src/include/tinyxml -DTIXML_USE_STL=YES  -pipe -Os -stdlib=libstdc++ -arch x86_64 -Winvalid-pch -fPIC -fexceptions -o sdk_precomp.h.gch -xc++-header ./sdk_precomp.h
In file included from ./sdk_precomp.h:13:
In file included from ../../src/include/sdk_common.h:43:
../../src/include/prep.h:366:16: error: no member named 'shared_ptr' in namespace 'std'
    using std::shared_ptr;
          ~~~~~^
../../src/include/prep.h:367:16: error: no member named 'static_pointer_cast' in namespace 'std'
    using std::static_pointer_cast;
          ~~~~~^
../../src/include/prep.h:368:16: error: no member named 'weak_ptr' in namespace 'std'
    using std::weak_ptr;
          ~~~~~^

I'll test whether using the cxx11 1.1 PortGroup is sufficient.

Change History (3)

comment:1 Changed 7 years ago by mojca (Mojca Miklavec)

I tried to use the cxx11 1.1 portgroup, the compilation runs smoothly, but it then crashes with

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
objc[56676]: garbage collection is OFF
*** error for object 0x7fff7aa3b940: pointer being freed was not allocated
 

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	0x00007fff8d747ce2 __pthread_kill + 10
1   libsystem_c.dylib             	0x00007fff894417d2 pthread_kill + 95
2   libsystem_c.dylib             	0x00007fff89432a7a abort + 143
3   libsystem_c.dylib             	0x00007fff8949184c free + 389
4   libstdc++.6.dylib             	0x000000010cf599f9 std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::assign(std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) + 59
5   org.codeblocks.app            	0x000000010b7e2f9b CodeBlocksApp::OnInit() + 95
6   libwx_osx_cocoau_core-3.0.dylib	0x000000010c6d0bfc wxApp::CallOnInit() + 158
7   libwx_baseu-3.0.dylib         	0x000000010cd3712e wxEntry(int&, wchar_t**) + 47
8   org.codeblocks.app            	0x000000010b7e1098 main + 22
9   org.codeblocks.app            	0x000000010b7e1034 start + 52

Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0   libsystem_kernel.dylib        	0x00007fff8d7487e6 kevent + 10
1   libdispatch.dylib             	0x00007fff8d664786 _dispatch_mgr_invoke + 923
2   libdispatch.dylib             	0x00007fff8d663316 _dispatch_mgr_thread + 54

Thread 2:
0   libsystem_kernel.dylib        	0x00007fff8d748192 __workq_kernreturn + 10
1   libsystem_c.dylib             	0x00007fff89441594 _pthread_wqthread + 758
2   libsystem_c.dylib             	0x00007fff89442b85 start_wqthread + 13

Thread 3:
0   libsystem_kernel.dylib        	0x00007fff8d748192 __workq_kernreturn + 10
1   libsystem_c.dylib             	0x00007fff89441594 _pthread_wqthread + 758
2   libsystem_c.dylib             	0x00007fff89442b85 start_wqthread + 13

Thread 4:
0   libsystem_kernel.dylib        	0x00007fff8d748192 __workq_kernreturn + 10
1   libsystem_c.dylib             	0x00007fff89441594 _pthread_wqthread + 758
2   libsystem_c.dylib             	0x00007fff89442b85 start_wqthread + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000000000006  rcx: 0x00007fff6b3d94b8  rdx: 0x0000000000000000
  rdi: 0x0000000000001a03  rsi: 0x0000000000000006  rbp: 0x00007fff6b3d94e0  rsp: 0x00007fff6b3d94b8
   r8: 0x00007fff79372fb8   r9: 0x00007fff894a4230  r10: 0x00007fff8d747d0a  r11: 0xffffff80002dad60
  r12: 0x000000010b9d9000  r13: 0x0000000000000004  r14: 0x00007fff79375960  r15: 0x0000000000000004
  rip: 0x00007fff8d747ce2  rfl: 0x0000000000000246  cr2: 0x000000010d0bb000
Logical CPU: 0
Last edited 5 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 7 years ago by kencu (Ken)

I couldn't get anywhere building it on 10.6 with libc++ and clang-3.9. I think it might be related to the precompiled headers?

In file included from tinywxuni.cpp:1:
In file included from ../../../src/include/sdk_precomp.h:13:
In file included from ../../../src/include/sdk_common.h:43:
../../../src/include/prep.h:23:11: error: declaration conflicts with target of using declaration already in scope
    const class nullptr_t
          ^

I tried enabling this:

configure.args-append   --disable-pch

but that didn't change anything.

comment:3 Changed 19 months ago by kencu (Ken)

Resolution: fixed
Status: newclosed

portfile sets compiler 2011

Note: See TracTickets for help on using tickets.