User forums > Help

Cannot build Code::Blocks from source

(1/3) > >>

alexchen:
I try to build Code::Blocks from source in CentOS 7.6 but it fails.
 
1. I get the source code from trunk:
    svn export http://svn.code.sf.net/p/codeblocks/code/trunk

2. Install wxGTK development pre-requisite
    yum install -y wxGTK-devel

3. Run the commands as listed in http://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_RPM_based_distributions#Build_the_RPM_package
    cd trunk
    ./bootstrap
    ./configure
    make dist

4. I get the following errors in 'make dist'
make[4]: Leaving directory `/home/fmserver/Downloads/CodeBlocks/trunk/src/plugins/xpmanifest'
 (cd contrib && make  top_distdir=../../../codeblocks-17.12svn0 distdir=../../../codeblocks-17.12svn0/src/plugins/contrib \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
make[4]: Entering directory `/home/fmserver/Downloads/CodeBlocks/trunk/src/plugins/contrib'
make[4]: *** No rule to make target `FortranProject/*.h', needed by `distdir'.  Stop.
make[4]: Leaving directory `/home/fmserver/Downloads/CodeBlocks/trunk/src/plugins/contrib'
make[3]: *** [distdir] Error 1
make[3]: Leaving directory `/home/fmserver/Downloads/CodeBlocks/trunk/src/plugins'
make[2]: *** [distdir] Error 1
make[2]: Leaving directory `/home/fmserver/Downloads/CodeBlocks/trunk/src'
make[1]: *** [distdir] Error 1
make[1]: Leaving directory `/home/fmserver/Downloads/CodeBlocks/trunk'
make: *** [dist] Error 2

alexchen:
I rebuild the source with the following commands and get a different error.
* ./configure --enable-fortran
* make all
* make list
....
make[7]: Entering directory '/home/fmserver/Downloads/CodeBlocks/trunk/src/plugins/contrib'
make  distdir-am
make[8]: Entering directory '/home/fmserver/Downloads/CodeBlocks/trunk/src/plugins/contrib'
make[8]: *** No rule to make target 'FortranProject/images/*.png', needed by 'distdir-am'.  Stop.
make[8]: Leaving directory '/home/fmserver/Downloads/CodeBlocks/trunk/src/plugins/contrib'
make[7]: *** [Makefile:709: distdir] Error 2
make[7]: Leaving directory '/home/fmserver/Downloads/CodeBlocks/trunk/src/plugins/contrib'
make[6]: *** [Makefile:626: distdir-am] Error 1
make[6]: Leaving directory '/home/fmserver/Downloads/CodeBlocks/trunk/src/plugins'
make[5]: *** [Makefile:622: distdir] Error 2
make[5]: Leaving directory '/home/fmserver/Downloads/CodeBlocks/trunk/src/plugins'
make[4]: *** [Makefile:636: distdir-am] Error 1
make[4]: Leaving directory '/home/fmserver/Downloads/CodeBlocks/trunk/src'
make[3]: *** [Makefile:632: distdir] Error 2
make[3]: Leaving directory '/home/fmserver/Downloads/CodeBlocks/trunk/src'
make[2]: *** [Makefile:776: distdir-am] Error 1
make[2]: Leaving directory '/home/fmserver/Downloads/CodeBlocks/trunk'
make[1]: *** [Makefile:770: distdir] Error 2
make[1]: Leaving directory '/home/fmserver/Downloads/CodeBlocks/trunk'
make: *** [Makefile:871: dist] Error 2

alexchen:
I am able to finish the build with a different configure flag
* ./configure --disable-fortran
* make all
* make list

How do I build an installable RPM after this?
Where do I run the command 'rpmbuild --rebuild codeblocks*.src.rpm' from?  (This is part of the instructions to build the RPM.)

sodev:
Why do you export the svn repository? This removes the svn metadata which will lead to revision 0 in the about box which is not really helpful. Plus without extra parameters it doesnt include the externals, thats why FortranProject is missing for you.

alexchen:

I use 'svn checkout' to get the source code but 'make dist' still gives me the same error.

* svn checkout http://svn.code.sf.net/p/codeblocks/code/trunk
* cd trunk
* ./bootstrap
* ./configure
* make all <----- This works.
* sudo make install <--------- This works, too.
* make list <----- This fails.  Is it OK to ignore the errors?
make[4]: Entering directory `/home/fmserver/Downloads/CodeBlocks.http/trunk/src/plugins/contrib'
make[4]: *** No rule to make target `FortranProject/images/*.png', needed by `distdir'.  Stop.
make[4]: Leaving directory `/home/fmserver/Downloads/CodeBlocks.http/trunk/src/plugins/contrib'
make[3]: *** [distdir] Error 1
make[3]: Leaving directory `/home/fmserver/Downloads/CodeBlocks.http/trunk/src/plugins'
make[2]: *** [distdir] Error 1
make[2]: Leaving directory `/home/fmserver/Downloads/CodeBlocks.http/trunk/src'
make[1]: *** [distdir] Error 1
make[1]: Leaving directory `/home/fmserver/Downloads/CodeBlocks.http/trunk'
make: *** [dist] Error 2
Question: how do I build the RPM?
According to the instruction, I need to run 'rpmbuild --rebuild codeblocks*.src.rpm'.  But where to run it from?

Navigation

[0] Message Index

[#] Next page

Go to full version