Author Topic: Guide for building C::B on Linux request due to wiki 502 error  (Read 11756 times)

Offline AndrewCot

  • Regular
  • ***
  • Posts: 320
Guide for building C::B on Linux request due to wiki 502 error
« on: September 07, 2021, 06:22:38 am »
Does anyone have an up to date guide for building C::B on Linux that they can give me or if someone can post a copy of the following wiki page as I cannot get to the wiki page due to the 502 errors:
  http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux

The 502's seem to have gotten worse over the last 2 days as I was able to get to it a week ago, but I only started to try and build it earlier today and have hit issues with missing or miss configured packages that should hopefully be documented on the wiki or if someone has an up to date guide.

Online Commaster

  • Almost regular
  • **
  • Posts: 130
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #1 on: September 07, 2021, 06:45:37 am »
Surprisingly I have no issues. Must be that IPv6/IPv4 thing again  ;)

Offline AndrewCot

  • Regular
  • ***
  • Posts: 320
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #2 on: September 07, 2021, 09:32:40 am »
Thanks for the doc.

BTW I have IP6 disabled on my router.

Offline cacb

  • Lives here!
  • ****
  • Posts: 509
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #3 on: September 07, 2021, 03:13:25 pm »
This is my build script under Kubuntu 20.04

Code
#!/bin/bash

#install build essentials for codeblocks with gtk2 and gtk3
sudo apt install cmake
sudo apt install build-essential
sudo apt install libgtk2.0-dev libhunspell-dev libgamin-dev
sudo apt install libwxgtk3.0-gtk3-dev

#path to wxWidgets configuration scripts
WX_CONFIG_DIR=/usr/local/lib/wx/config

#actual wxWidgets configuration to use
#to see alternatives use: find /usr/local/lib/wx/config/*
WX_CONFIG=gtk2-unicode-3.0
WX_CONFIG_FULLPATH="$WX_CONFIG_DIR/$WX_CONFIG"

#build and install paths
CB_DIR=/ssd1/codeblocks
CB_BUILD_PATH="$CB_DIR/$WX_CONFIG/build"
CB_INSTALL_PATH="$CB_DIR/$WX_CONFIG/install"

#create build area
mkdir -p "$CB_BUILD_PATH"
pushd    "$CB_BUILD_PATH"
pwd
git clone https://github.com/obfuscated/codeblocks_sf
cd codeblocks_sf/

#configure, build & install using selected configuration
./bootstrap
./configure --with-contrib-plugins=all             \
            --with-wx-config="$WX_CONFIG_FULLPATH" \
            --prefix="$CB_INSTALL_PATH"
make
make install
ls -l "$CB_INSTALL_PATH/bin"
popd

Offline AndrewCot

  • Regular
  • ***
  • Posts: 320
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #4 on: September 08, 2021, 10:54:52 am »
@cacb than you very much for the script. I used it instead of the WIKI doc as the WIKI was for WxWidget 2.8 and as such was way out of date. I used GTK3. I was able to build and run the SF 12529 trunk code.


I had to add a few more packages from the default xubuntu-20.04.2.0-desktop-amd64.iso install (on Virtualbox using a script) to get it to compile and remove the  --with-wx-config="$WX_CONFIG_FULLPATH" ./configure option as the wxconfig was not in the directory specified, but was in the path.

My updated script is below:
Code
#!/bin/bash

#---- install build essentials for codeblocks with gtk2 and gtk3 ----
sudo apt install -y git
sudo apt install -y cmake
sudo apt install -y build-essential
sudo apt install subversion
sudo apt install -y libhunspell-dev libgamin-dev
sudo apt-get install libboost-system-dev

#-------- install build packages for codeblocks with gtk2 --------
# GTK2 #sudo apt install -y libgtk2.0-dev 

#-------- install build packages for codeblocks with gtk3 --------
sudo apt install -y libgtk-3-devmake
sudo apt install -y libwxgtk3.0-gtk3-0v5 libwxgtk3.0-gtk3-dev

# -----------------------------------------------------------------

#path to wxWidgets configuration scripts
WX_CONFIG_DIR=/usr/local/lib/wx/config

#actual wxWidgets configuration to use
#to see alternatives use: find /usr/local/lib/wx/config/*
WX_CONFIG=gtk3-unicode-3.0
WX_CONFIG_FULLPATH="$WX_CONFIG_DIR/$WX_CONFIG"

#build and install paths
CB_DIR=~/code/codeblocks
CB_BUILD_PATH="$CB_DIR/$WX_CONFIG/build"
CB_INSTALL_PATH="$CB_DIR/$WX_CONFIG/install"

#create build area
mkdir -p "$CB_BUILD_PATH"
pushd    "$CB_BUILD_PATH"
pwd
#git clone https://github.com/obfuscated/codeblocks_sf codeblocks_git
#cd codeblocks_git
svn checkout https://svn.code.sf.net/p/codeblocks/code/trunk codeblocks_sf
cd codeblocks_sf

# -----------------------------------------------------------------

#configure, build & install using selected configuration
./bootstrap
./configure --with-contrib-plugins=all             \
            --prefix="$CB_INSTALL_PATH"
#./configure --with-contrib-plugins=all             \
#            --with-wx-config="$WX_CONFIG_FULLPATH" \
#            --prefix="$CB_INSTALL_PATH"

make
make install
ls -l "$CB_INSTALL_PATH/bin"
popd

Below is the VirtualBox script I use to install the initial XUbuntu and then did an upgrade and ran the script. I hope this may save you time in the future if you need to use VB as it can be modified for Windows very easily as most of the lines are for configuring the Virtualbox common HDD, Network, Video, Sound and serial port settings.


Code
@rem https://kifarunix.com/how-to-automate-virtual-machine-installation-on-virtualbox/

set VM_Name=XUbuntu-2004-CB
set UserName=UNAME
set UserPassword=UPASSWORD
set ISO_IMAGE="%CD%\xubuntu-20.04.2.0-desktop-amd64.iso"

@rem ==============================================================================

set VM_Directory=G:\VirtualBox
set VBoxManageExe="C:\Program Files\Oracle\VirtualBox\VBoxManage.exe"

@rem goto end
@rem goto OS_Install
@echo off
%VBoxManageExe% createvm --name %VM_Name% --ostype Ubuntu_64 --register --basefolder "%VM_Directory%"
%VBoxManageExe% createmedium --filename "%VM_Directory%\%VM_Name%\%VM_Name%.vdi" --format VDI --size 102200

%VBoxManageExe% storagectl %VM_Name% --name SATA --add SATA --controller IntelAhci
%VBoxManageExe% storageattach %VM_Name% --storagectl SATA --port 0 --device 0 --type hdd --medium "%VM_Directory%\%VM_Name%\%VM_Name%.vdi"

%VBoxManageExe% storagectl %VM_Name% --name IDE --add IDE --controller PIIX4
@rem %VBoxManageExe% storageattach %VM_Name% --storagectl IDE --port 0 --device 0 --type dvddrive --medium "none"

%VBoxManageExe% modifyvm %VM_Name% --clipboard-mode bidirectional --draganddrop bidirectional
%VBoxManageExe% modifyvm %VM_Name% --memory 8192 --vram 128
%VBoxManageExe% modifyvm %VM_Name% --graphicscontroller vmsvga --monitorcount 2 --accelerate3d on
%VBoxManageExe% modifyvm %VM_Name% --ioapic on
%VBoxManageExe% modifyvm %VM_Name% --boot1 dvd --boot2 disk --boot3 none --boot4 none
%VBoxManageExe% modifyvm %VM_Name% --cpus 4
%VBoxManageExe% modifyvm %VM_Name% --audio dsound  --audiocontroller hda  --audioin off    --audioout on

%VBoxManageExe% modifyvm %VM_Name% --usb off
%VBoxManageExe% modifyvm %VM_Name% --usbohci off
%VBoxManageExe% modifyvm %VM_Name% --usbehci off
%VBoxManageExe% modifyvm %VM_Name% --usbxhci off

%VBoxManageExe% modifyvm %VM_Name% --nic1 nat --nictype1 82540EM --cableconnected1 on --natpf1 ["EGM Simulator"],tcp,[0.0.0.0],3321,[0.0.0.0],3321

%VBoxManageExe% modifyvm %VM_Name% --nic2 none
%VBoxManageExe% modifyvm %VM_Name% --nic3 none
%VBoxManageExe% modifyvm %VM_Name% --nic4 none

%VBoxManageExe% modifyvm %VM_Name% --uart1 0x3f8 4 --uartmode1 COM1
%VBoxManageExe% modifyvm %VM_Name% --uart2 off
%VBoxManageExe% modifyvm %VM_Name% --uart3 0x3e8 4 --uartmode3 COM3
%VBoxManageExe% modifyvm %VM_Name% --uart4 0x2e8 3 --uartmode4 COM4

%VBoxManageExe% sharedfolder add %VM_Name% --name="VirtualBoxTransfer" --hostpath="%VM_Directory%\VB_Transfer" --automount --auto-mount-point="/home/%UserName%/Transfer"

:OS_Install
@rem  NOTE: A caret at the line end, appends the next line, the first character of the appended line will be escaped.

@echo on
%VBoxManageExe% unattended install "%VM_Name%" --user=%UserName% --password=%UserPassword% --country=AU --time-zone="Australia/Sydney" --hostname="%VM_Name%".myguest.virtualbox.org ^
--iso="%ISO_IMAGE%" --start-vm=gui --install-additions --post-install-command="/home/%UserName%/Transfer/SU_Install_Common_and_GamingMachine.sh"

@rem --additionsIsoPath = C:\Program Files\Oracle\VirtualBox\ VBoxGuestAdditions.iso

@rem does NOT work %VBoxManageExe% guestproperty wait "%VM_Name%" installation_finished
@rem %VBoxManageExe%VBoxManage controlvm "%VM_Name%" acpipowerbutton
@rem %VBoxManageExe%VBoxManage startvm "%VM_Name%"

@rem %VBoxManageExe% --nologo guestcontrol "%VM_Name%" run --exe "usermod -G vboxsf -a ubuntu" --username su --password ubuntu --wait-stdout
@echo.
@echo.
@echo ^+=====================================================================================^+
@echo ^+                                                                                     ^|
@echo ^+  REBOOT THE VM ONCE THE INSTALL FINISHES FOR THE TRASFER DIRECTORY MAPPING TO SETUP ^|
@echo ^+                                                                                     ^|
@echo ^+=====================================================================================^+
@echo ^+                                                                                     ^|
@echo ^+  After the reboot run follwoing (su password is ubuntu):                            ^|
@echo ^+                                                                                     ^|
@echo ^+          su                                                                         ^|
@echo ^+          adduser ubuntu sudo                                                        ^|
@echo ^+  and then reboot.                                                                   ^|
@echo ^+                                                                                     ^|
@echo ^+ and then:                                                                           ^|
@echo ^+          su                                                                         ^|
@echo ^+          cd ./Transfer                                                              ^|
@echo ^+          ./SU_Install_Common_and_GamingMachine.sh                                   ^|
@echo ^+                                                                                     ^|
@echo ^+=====================================================================================^+
@echo.
@echo.

goto end

:end

Offline AndrewCot

  • Regular
  • ***
  • Posts: 320
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #5 on: September 08, 2021, 12:27:06 pm »
Small update:

I have installed GCC 11.1.0 and have successfully built C::B with iGCC 11.1.0 and it runs.

Offline cacb

  • Lives here!
  • ****
  • Posts: 509
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #6 on: September 08, 2021, 07:33:57 pm »
@cacb than you very much for the script.
You're welcome, thanks for the updates on GTK3 packages. I am building under Kubuntu 20.04 and find GTK2 works best in my case, but will be ready for GTK3.

Maintaining such a script is easier than a wiki I guess.

Offline AndrewCot

  • Regular
  • ***
  • Posts: 320
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #7 on: September 10, 2021, 06:11:57 am »
Watch out when build C::B via workspace and/or project file on Linux as some of the project files include references to GTK2 like the following:

               <Add option="`pkg-config gdk-2.0 --cflags`" />
               <Add option="`pkg-config --libs gtk+-2.0`" />

Hope this of some use for the future. Now for me to start working on getting the projects files to build with GTK3.

Offline cacb

  • Lives here!
  • ****
  • Posts: 509
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #8 on: November 20, 2021, 11:27:45 am »
I am keeping my C::B Linux build script here
https://github.com/arnholm/cpde_3rdparty/blob/master/gcc/codeblocks/build_cb.sh

This build script has now been updated to use my new unofficial github mirror of the C::B SourceForge SVN repo
https://github.com/arnholm/codeblocks_sfmirror

The idea is that this mirror is updated automatically once per day and is intended to reflect the SVN repo exactly (it remains to be seen if this works ok when the SVN repo is next updated). The mirror contains a single master branch only, corresponding to SVN trunk. This mirror is passive, it does NOT accept pull requests or patches.

Offline gd_on

  • Lives here!
  • ****
  • Posts: 686
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #9 on: November 20, 2021, 12:00:27 pm »
I think that the problem with all git unofficial C::B mirrors is that they don't have the fortranproject plugin. As this one is apparently only on svn, I don't know if a link from git is possible.
Windows 10 64 bits (21H2), svn C::B (last version or almost!), wxWidgets 3.1.5, Msys2 Compilers 11.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (sjlj, posix in C:\msys64\mingw32).

Offline cacb

  • Lives here!
  • ****
  • Posts: 509
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #10 on: November 20, 2021, 12:46:49 pm »
Everything that is in SVN trunk should be in the git mirror as far as I can tell.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5440
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #11 on: November 20, 2021, 04:03:57 pm »

This build script has now been updated to use my new unofficial github mirror of the C::B SourceForge SVN repo
https://github.com/arnholm/codeblocks_sfmirror

The idea is that this mirror is updated automatically once per day and is intended to reflect the SVN repo exactly (it remains to be seen if this works ok when the SVN repo is next updated). The mirror contains a single master branch only, corresponding to SVN trunk. This mirror is passive, it does NOT accept pull requests or patches.

Good work!
I see OBF's  obfuscated/codeblocks_sf: Unofficial GIT clone of C::B repo in SourceForge (maintained by C::B developer, accepts patches or pull requests) hasn't got updated for a long time.

BTW, I personally think we can drop svn and use git for the official developers.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline cacb

  • Lives here!
  • ****
  • Posts: 509
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #12 on: November 20, 2021, 04:29:42 pm »
Good work!
I see OBF's  obfuscated/codeblocks_sf: Unofficial GIT clone of C::B repo in SourceForge (maintained by C::B developer, accepts patches or pull requests) hasn't got updated for a long time.
Thanks! Yes, it was the missing updates there that caused me to make another mirror. OBF's mirror has served me very well for a long time, maybe it will get up to date again.

BTW, I personally think we can drop svn and use git for the official developers.
Technically that should be possible, but that is up to the official developers to decide obviously. I agree it might be a good idea.

Offline AndrewCot

  • Regular
  • ***
  • Posts: 320
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #13 on: November 20, 2021, 11:57:12 pm »
In the past OBF has shot down the move to GIT a number of times and as such it may not fly.  I agree moving to GIT is the way forward in this decade.

Saying that SF has GIT support, so the first thing is for someone to figure out how GIT in SF works if you are already are using SVN see if you enable/setup/config GIT in SF what how do the SVN and GIT interact and will this enable usage of both GIT or SVN and the changes automatically get applied to the other. I have no idea if this is possible or not or how SF version control works under the hood.
« Last Edit: November 21, 2021, 12:01:08 am by AndrewCot »

Offline AndrewCot

  • Regular
  • ***
  • Posts: 320
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #14 on: November 21, 2021, 12:00:49 am »
@caab your GITHUB repo like OBF's does NOT include the SVN referenced Fortran repo. Be aware that as such if you use it as it is it will not build due to the missing Fortran plugin source.

Offline cacb

  • Lives here!
  • ****
  • Posts: 509
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #15 on: November 21, 2021, 07:42:09 am »
Saying that SF has GIT support, so the first thing is for someone to figure out how GIT in SF works if you are already are using SVN see if you enable/setup/config GIT in SF what how do the SVN and GIT interact and will this enable usage of both GIT or SVN and the changes automatically get applied to the other. I have no idea if this is possible or not or how SF version control works under the hood.

I tried to access the SF SVN repo with SF's claimed git support, but I couldn't make it work. Maybe that's just me, but anyway. So instead I installed the support for svn in git (I use Kubuntu 20.04 for this):

Code
sudo apt-get install git-svn
git svn clone https://svn.code.sf.net/p/codeblocks/code/trunk codeblocks-code
Clearly, if you research git-svn it is possible to feed back updates to SVN repos from git svn, but I think it would be much easier if the main C::B repo was a git repo, on github or somewhere else.

By the way, I can now see that the latest SF SVN updates to C::B from a few hours ago have been successfully replicated in my github mirror, so it seems to be working as intended.

Offline cacb

  • Lives here!
  • ****
  • Posts: 509
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #16 on: November 21, 2021, 07:49:18 am »
@caab your GITHUB repo like OBF's does NOT include the SVN referenced Fortran repo. Be aware that as such if you use it as it is it will not build due to the missing Fortran plugin source.

Where is the Fortran repo? How does this work with SVN? My repo is a direct copy of SVN trunk. Is there some mechanism in svn that clones an external repo similar to git submodule?

If there is anything to fix, as a minimum I need some pointers.

Offline cacb

  • Lives here!
  • ****
  • Posts: 509
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #17 on: November 21, 2021, 09:43:23 am »
If there is anything to fix, as a minimum I need some pointers.

Actually, I don't understand the claim that the Fortran plugin is missing. I just tested C::B built yesterday from my github mirror, where supposedly the Fortran plugin is missing, but I was able to compile and build a Fortran program just fine. All I had to do was to install gfortran (under Kubuntu 20.04)

Code
sudo apt-get install gfortran

In C::B I did
Code
File -> New Project ... Fortran Application 
I chose the "GNU Fortran Compiler" and  it worked, see attached screenshot.

Is this because I have a default.conf from before or what? As far as I can tell Fortran works just fine.




Offline AndrewCot

  • Regular
  • ***
  • Posts: 320
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #18 on: November 21, 2021, 10:58:02 am »
Sorry, but I am not a SVN user, apart from fetching C::B from SF. As such some of the SVN info below I only just looked up.

1. The fortran repo is on SF
    https://sourceforge.net/projects/cbfortran/
   
    The CBFortan plugin home page is:
        https://cbfortran.sourceforge.io/
   On the page the dev section has the following:
The major part, which makes C::B IDE useful for Fortran, is FortranProject plugin. This plugin has a separate project for development on Sourceforge. There you can download latest source code directly from svn.
     
The fortran plugin SVN repo is:
    http://svn.code.sf.net/p/fortranproject/code/trunk/

2. The plugin references can be found by searching for "FortranProject" the src/*.workspace files and in the src\plugins\contrib\Makefile.am. Be aware that ticket 1155 restores the Fortran plugin in the workspace files.

3. I may be completely wrong, but you are correct in that you do not need the plugin to compile a fortran program. It adds a Fortran menu and options that make it easier. Attached is


4. When I browse the SF SVN C::B repo using Tortoise SVN on Windows the src\plugins\contrib\FortranProject as a little arrow on the folder icon on the bottom left. The PythonPlugns also has the same arrow, so it may also be missing.
 When I click on the src\plugins\contrib\FortranProject directory the URL in the TortoiseSVN broser shows https://svn.code.sf.net/p/fortranproject/code/trunk
 When I click on the src\plugins\contrib\PythonPlugns directory the URL in the TortoiseSVN broser shows https://github.com/spillz/codeblocks-python/trunk

My conclusion is like GIT sub modules SVN can also reference other repos. For SVN externals checkout the following https://svnbook.red-bean.com/en/1.0/ch07s03.html for info on it.

5. The source that are used to create the Windows installer are in the following SF repo:
    http://svn.code.sf.net/p/codeblocks/code/setup
   This SVn repo will also need to be converted to GIT.  See ticket 1119 and https://github.com/acotty/codeblocks_sf/tree/AC-WindowInstallerUpgrade as I have worked on the installer and moved it into the main repo as the scripts to build the Debian are in the main repo so why shouldn't the Windows files. So it may be easier to move/update the installer. I am still waiting for feedback from MortenMacFly  as per the following thread https://forums.codeblocks.org/index.php/topic,24603.0.html

6. The source for the documentation needed to create the docs are in the following SF repo:
    http://svn.code.sf.net/p/codeblocks/code/docs
   This SVN repo will also need to be converted to GIT. It is not easy to generate the docs, see https://forums.codeblocks.org/index.php/topic,23614.msg160976.html#msg160976 for info/help/tips/tricks etc....

7. There are other SF repo's under the following folder that are very old and as such may not be of any use
     http://svn.code.sf.net/p/codeblocks/code/


Offline AndrewCot

  • Regular
  • ***
  • Posts: 320
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #19 on: November 21, 2021, 11:36:50 am »
Before you start this have a look at the following plugin:
    https://github.com/loandr/GitBlocks

And get a few of the long term devs on board otherwise you will be doing work for nothing and based on previous posts this may not flay. The tickets are littered with devs who who have supplied patches and no one has looked at them and as such they wasted their time and the patches will never be incorporated. I worked on generating a list of tickets that could be closed easily and this went no where.

The reason for the changes not being incorporated has driven good devs away from the project. Once you figure out how the process works or does not work you will understand why. I would suggest you start with something smaller that could potentially make it into the truck and see how the process works and who is involved in the process.

Offline cacb

  • Lives here!
  • ****
  • Posts: 509
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #20 on: November 21, 2021, 06:09:12 pm »
Sorry, but I am not a SVN user, apart from fetching C::B from SF. As such some of the SVN info below I only just looked up.

Thank you for a lot of info, I am also not an SVN user  8) . Let me clear up some points, though. Note that my ambition is not to reform the Code::Blocks main repository, I just want a convenient mirror on Github. 

Ideally, if you 'git clone' from that mirror, the result should be the same as for 'svn checkout' from the original SVN repo. It turns out that this is not 100% the case now because the contrib plugins FortranProject and PythonPlugins are missing. So why are they missing?

It turns out that in SVN you have something called svn externals which is kind of similar to git submodules, but not quite. SVN Externals are references to separate SNV repos, but svn externals and git submodules are sufficiently different that git-svn doesn't support externals. There are many discussions like this on the net, but no really obvious solutions for a case like this, or at least I haven't found one.

For now, developers who want to build C::B with plugins FortranProject and/or PythonPlugins should use the svn repo directly. I can't really see how a github mirror can accomodate such externals without messing with the commit history. At least it would require some research to come up with a solution, and personally I don't use those plugins.

If the repositories all migrated permanently to git, then FortranProject and PythonPlugins could become git submodules.

Your points:

1. See above
2. See above
3. Yes you can build a Fortran project without the FortranProject plugin, but maybe miss some features like debugging.
4. Those arrows indicate svn externals

To obtain a git mirror with all external plugins require solving the svn externals => git incompatibility issue.

Offline AndrewCot

  • Regular
  • ***
  • Posts: 320
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #21 on: November 21, 2021, 11:51:05 pm »
In total agreement.

Offline gd_on

  • Lives here!
  • ****
  • Posts: 686
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #22 on: November 22, 2021, 09:43:42 am »
May be a simple solution is that Darmar (the FortranProject plugin author) creates a git copy synchronized of his svn repository. Then adding a git submodule is easier.
The same for other plugins as python probably.
Windows 10 64 bits (21H2), svn C::B (last version or almost!), wxWidgets 3.1.5, Msys2 Compilers 11.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (sjlj, posix in C:\msys64\mingw32).

Offline cacb

  • Lives here!
  • ****
  • Posts: 509
Re: Guide for building C::B on Linux request due to wiki 502 error
« Reply #23 on: November 22, 2021, 05:34:30 pm »
May be a simple solution is that Darmar (the FortranProject plugin author) creates a git copy synchronized of his svn repository. Then adding a git submodule is easier.
The same for other plugins as python probably.
I think the following is true:

If the original C::B repo is in svn, then the contrib repos must be svn also (referenced as svn externals). If the original C::B repo is in git, then then the contrib repos must be git also (referenced as git submodules or git subtrees). I do not believe it is possible to mix.

If all repos were mirrored to git, you would still have to manually modify the C::B mirror to reference the git mirrors instead of the original svn externals. But maintaining this would require additional commits so it can't be done in the master branch and would as a minimum require a separate git branch just to handle this I think (I could be wrong as there are many things in git I don't know that well). Maybe this is workable, not sure.

So it isn't really straightforward to support the svn externals unless all move permanently to git.

--- thinking loud:

Another elaborate scheme I thought about was using the git-svn-clone-externals scripts which creates symlinked local git-svn clones of svn externals to create an effect in git that resembles the original svn external. But it only works locally on linux with symlinks, and you can't push it to github in any meaningful way.

Even more elaborate would be to modify the git-svn-clone-externals script to create a git subtree instead of a linux symlink. This would also have to happen in a separate branch. In this case it would be possible to push the result to github and everyone would get a complete copy similar to svn. But I have not researched if this can be maintained easily. Again a separate branch would be needed I think. And yes, it sounds like a lot of work.