Author Topic: D Programming Language Support  (Read 55121 times)

Offline nocide

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: D Programming Language Support
« Reply #15 on: April 01, 2010, 12:52:36 am »
Ok, cool!

I just tried to patch on Kubuntu 9.10 myself, and I'v got the same error.
But this seems to be a known bug by the diff tool, which don't handle the CRNL code correctly.
For future patch I try to make the diff on linux. I just need to patch my workingcopy on linux myself!?!

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: D Programming Language Support
« Reply #16 on: April 01, 2010, 07:16:45 am »
But this seems to be a known bug by the diff tool, which don't handle the CRNL code correctly.
I think still the best way to create a working patch is if you use svn from the command line like:
svn diff > d.patch
Execute this command in the root SVN folder (trunk) of Code::Blocks.
Make sure you always do an svn update on trunk before, otherwise you might get other conflicts.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline nocide

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: D Programming Language Support
« Reply #17 on: April 01, 2010, 11:19:08 am »
svn diff > d.patch
Execute this command in the root SVN folder (trunk) of Code::Blocks.

That's what I have tried.
I also tried svn diff --diff-cmd diff > d.patch to use another diff
tool, but I've got similar result
On win32 this patches works ok, but on linux we get the error as bernard mentioned.
Also a dos2unix or gawk '{ sub("\r$", ""); print }' ... does not help.
It's really strange, I can't see any reason for this failure, when I explore the patch-files.

But I hope I can resolve this issue by going the other way around and create the patches on
linux, which hopefully can applied on win32.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: D Programming Language Support
« Reply #18 on: April 01, 2010, 04:59:56 pm »
It's really strange, I can't see any reason for this failure, when I explore the patch-files.
Well there is another reason: An incompatible patch application. ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline nocide

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: D Programming Language Support
« Reply #19 on: April 02, 2010, 05:02:59 pm »
Ok, now I have created the patch on linux, and also added the lineendings for windows.
Now it should work on all supported plattforms: (Linux,win32,OSX,freeBSD)

Please report any bugs, specificaly related to the compiler and linker settings.
I am not able to test all compilers on all plattfroms. This would be simply too much work for my sparetime :)

greets
nocide

Offline nocide

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: D Programming Language Support
« Reply #20 on: April 10, 2010, 01:44:47 pm »
update: 2010-04-10
- some bugfixes (tested on linux/windows)
- now with different auto-detection for D1/D2 (gdc/dmd)

Offline nocide

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: D Programming Language Support
« Reply #21 on: April 10, 2010, 05:16:48 pm »
update-2: 2010-04-10
- recognized a bug in compilerD.cpp on windows > wxShell does not exist in windows version, replaced with wxExecute

Offline Andrej08

  • Single posting newcomer
  • *
  • Posts: 7
Re: D Programming Language Support
« Reply #22 on: June 20, 2010, 06:58:47 pm »
I get errors when trying to patch with svn6354:
Code
C:\codeblocks>patch -p0 < d_v8_win.patch
patching file debian/changelog
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file debian/changelog.rej
patching file src/plugins/compilergcc/compilerDMD.h
patching file src/plugins/compilergcc/compilerD.h
patching file src/plugins/compilergcc/compilerGDC.h
patching file src/plugins/compilergcc/compilerDMD.cpp
Hunk #1 succeeded at 7 with fuzz 1.
patching file src/plugins/compilergcc/compilerD.cpp
patching file src/plugins/compilergcc/compilergcc.cpp
patching file src/plugins/compilergcc/compilerGDC.cpp
patching file src/plugins/scriptedwizard/resources/common_functions.script
patching file src/plugins/scriptedwizard/resources/d/console/hello.d
patching file src/plugins/scriptedwizard/resources/d/wizard.script
patching file src/plugins/codecompletion/codecompletion.cpp
patching file src/sdk/resources/lexers/lexer_d.xml
patching file src/sdk/resources/lexers/lexer_d.sample
patching file src/CodeBlocks-unix.cbp
Hunk #1 succeeded at 1140 (offset 14 lines).
patching file src/CodeBlocks.cbp
Hunk #1 succeeded at 1279 (offset 53 lines).

changelog.rej:
Code
***************
*** 1,4 ****
- codeblocks (8.02svn5933) unstable; urgency=low
  
    * more fixes to debian build system, sources and packages are now
      lintian-clean, except for some words guessed as spelling-errors.
--- 1,4 ----
+ codeblocks (8.02svn6198) unstable; urgency=low
  
    * more fixes to debian build system, sources and packages are now
      lintian-clean, except for some words guessed as spelling-errors.

And then I get errors trying to build CB. Build Log:

Code
||=== Code::Blocks, Compiler ===|
C:\codeblocks\src\plugins\compilergcc\compilerD.cpp|40|error: redefinition of 'wxString CompilerD::GetCmdOutput(wxString, wxString, int) const'|
C:\codeblocks\src\plugins\compilergcc\compilerD.cpp|6|error: 'wxString CompilerD::GetCmdOutput(wxString, wxString, int) const' previously defined here|
C:\codeblocks\src\plugins\compilergcc\compilerD.cpp|59|error: redefinition of 'wxString CompilerD::GetCmdOutput(wxString) const'|
C:\codeblocks\src\plugins\compilergcc\compilerD.cpp|25|error: 'wxString CompilerD::GetCmdOutput(wxString) const' previously defined here|
||=== Build finished: 4 errors, 0 warnings ===|
||=== Build finished: 4 errors, 0 warnings ===|

Hope this helps..

Edit: Forgot to mention this is on XP-32bit

Offline michaelp

  • Single posting newcomer
  • *
  • Posts: 5
Re: D Programming Language Support
« Reply #23 on: June 20, 2010, 11:33:58 pm »
Also have problems patching. This is with the 10.05 source.
Code
patching file changelog
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file changelog.rej
patching file compilerDMD.h
Hunk #1 FAILED at 3.
1 out of 1 hunk FAILED -- saving rejects to file compilerDMD.h.rej
patching file compilerD.h
patching file compilerGDC.h
Hunk #1 FAILED at 6.
Hunk #2 succeeded at 18 with fuzz 3 (offset -1 lines).
1 out of 2 hunks FAILED -- saving rejects to file compilerGDC.h.rej
patching file compilerDMD.cpp
Hunk #1 FAILED at 7.
Hunk #2 FAILED at 17.
Hunk #3 succeeded at 110 with fuzz 3 (offset -1 lines).
Hunk #4 FAILED at 153.
3 out of 4 hunks FAILED -- saving rejects to file compilerDMD.cpp.rej
patching file compilerD.cpp
patching file compilergcc.cpp
Hunk #1 FAILED at 393.
1 out of 1 hunk FAILED -- saving rejects to file compilergcc.cpp.rej
patching file compilerGDC.cpp
Hunk #1 FAILED at 24.
Hunk #2 FAILED at 83.
Hunk #3 succeeded at 108 with fuzz 3 (offset -1 lines).
Hunk #4 succeeded at 195 with fuzz 3 (offset -2 lines).
Hunk #5 FAILED at 252.
3 out of 5 hunks FAILED -- saving rejects to file compilerGDC.cpp.rej
patching file common_functions.script
Hunk #1 FAILED at 24.
Hunk #2 FAILED at 65.
Hunk #3 FAILED at 115.
Hunk #4 FAILED at 130.
4 out of 4 hunks FAILED -- saving rejects to file common_functions.script.rej
patching file hello.d
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file hello.d.rej
patching file wizard.script
Hunk #1 FAILED at 17.
Hunk #2 FAILED at 28.
2 out of 2 hunks FAILED -- saving rejects to file wizard.script.rej
patching file codecompletion.cpp
Hunk #1 succeeded at 78 with fuzz 3 (offset -1 lines).
Hunk #2 FAILED at 644.
1 out of 2 hunks FAILED -- saving rejects to file codecompletion.cpp.rej
patching file lexer_d.xml
Hunk #1 FAILED at 3.
Hunk #2 FAILED at 68.
2 out of 2 hunks FAILED -- saving rejects to file lexer_d.xml.rej
patching file lexer_d.sample
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 15.
2 out of 2 hunks FAILED -- saving rejects to file lexer_d.sample.rej
patching file CodeBlocks-unix.cbp
Hunk #1 succeeded at 1125 with fuzz 3 (offset -1 lines).
patching file CodeBlocks.cbp
Hunk #1 succeeded at 1225 with fuzz 3 (offset -1 lines).

Using:
Code
patch -F 100 < d_v8_unix.patch

On Ubuntu 10.04. Didn't try to compile it.
If this could work with the latest SVN, or this release, that would be great.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7608
    • My Best Post
Re: D Programming Language Support
« Reply #24 on: June 21, 2010, 12:00:32 am »
The command I use to create an unified patch on Windows.
This is the result of reading and lots of trial and error.

My SVN is CollabNet Subversion Client and my patch and unix2dos is from GnuWin32

Code
svn.exe diff --extensions --unified --extensions --ignore-space-change --extensions --ignore-eol-style > my.patch

The command I use to apply the created patch is

Code
unix2dos < my.patch > my-CRLF.patch
patch --backup-if-mismatch --unified --strip=0 --ignore-whitespace --forward --input=my-CRLF.patch

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7608
    • My Best Post
Re: D Programming Language Support
« Reply #25 on: June 21, 2010, 12:18:25 am »
Quote
Start by selecting which strings are translatable and mark them with the _() macro.
From http://wiki.wxwidgets.org/Internationalization
http://www.wxwidgets.org/docs/faqcmn.htm#wxtmacro

You are changing text from _("Words") to _T("Words") this is likely wrong if the words are supposed to be translated.

Code
@@ -83,12 +87,12 @@
 
     m_Options.ClearOptions();
     m_Options.AddOption(_("Produce debugging symbols"),
-                _T("-g"),
-                _("Debugging"),
+                _T("-gc"),
+                _T("Debugging"),
                 _T(""),
                 true,
                 _T("-O -O1 -O2 -O3 -Os"),
-                _("You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."));
+                _T("You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."));
     wxString gprof_link = _T("-pg");
     if (platform::windows)
         gprof_link = _T("-pg -lgmon");

Tim S.
« Last Edit: June 21, 2010, 12:38:25 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline bioinfornatics

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: D Programming Language Support
« Reply #26 on: June 26, 2010, 04:23:18 am »
hello, i am a fedora packager and ldc and tango will be go to official fedora repo.
How use LDC compiler with codeblocks ?

beta rpm here: http://bioinfornatics.fedorapeople.org/

Offline bioinfornatics

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: D Programming Language Support
« Reply #27 on: July 27, 2010, 01:14:45 pm »
ping

Note: ldc has moved to offcial fedora repo

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: D Programming Language Support
« Reply #28 on: July 28, 2010, 09:21:45 pm »
How use LDC compiler with codeblocks ?

You should be able to create such a feature patch by modifying the GDC support...

However, I don't think LDC works well with Windows yet (no exception support) ?


Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: D Programming Language Support
« Reply #29 on: July 28, 2010, 09:24:16 pm »
Note: ldc has moved to offcial fedora repo

and gdc is in the official ubuntu repo (for whatever that means).