News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

SmartIndent refactoring question

Started by Alpha, October 01, 2012, 01:00:14 AM

Previous topic - Next topic

MortenMacFly

Quote from: oBFusCATed on November 04, 2012, 11:35:24 PM
But still someone should rename the plugins to be a more closer together in the UI.
I'll take the action. Please devs: Do not touch SmartIndent for the moment therefore...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

MortenMacFly

Quote from: MortenMacFly on November 05, 2012, 08:45:20 AM
I'll take the action. Please devs: Do not touch SmartIndent for the moment therefore...
...should be done now.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

Quote from: MortenMacFly on November 05, 2012, 09:36:08 AM
Quote from: MortenMacFly on November 05, 2012, 08:45:20 AM
I'll take the action. Please devs: Do not touch SmartIndent for the moment therefore...
...should be done now.
Seems to work with automake-system on linux (at least all plugins are loaded).
I committed tiny fixes to debian build-files and added the python smartindent-plugin to the contrib-plugins list in spec-file for rpm and debian/control .

MortenMacFly

Quote from: jens on November 05, 2012, 10:30:43 AM
I committed tiny fixes to debian build-files and added the python smartindent-plugin to the contrib-plugins list in spec-file for rpm and debian/control .
OK - thanks. BTW: I realised SmartIndent is not part of the wx29 build yet.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

killerbot

today : svn up + make clean + make + sudo make install

It even got worse :

Tools Plus Plugin: Registering shell type Piped Process Control
Plugin manifest could not be parsed: /usr/local/share/codeblocks/FortranSmartIndent.zip
Plugin manifest could not be parsed: /usr/local/share/codeblocks/SmartIndentCpp.zip
Invalid manifest file for: HDLSmartIndent
Invalid manifest file for: SmartIndentXML
Invalid manifest file for: PascalSmartIndent
Plugin manifest could not be parsed: /usr/local/share/codeblocks/SmartIndentHDL.zip
Plugin manifest could not be parsed: /usr/local/share/codeblocks/SmartIndentPython.zip
Invalid manifest file for: LuaSmartIndent
Invalid manifest file for: PythonSmartIndent
Plugin manifest could not be parsed: /usr/local/share/codeblocks/SmartIndentPascal.zip

MortenMacFly

Quote from: killerbot on November 05, 2012, 08:10:36 PM
today : svn up + make clean + make + sudo make install
There you go: Your error is that the autofoo build system has changed. So you need to make a full bootstrap session, or at least a make dist clean.

(Says the Linux newbie... :P)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

I suggest not to build C::B from the sources root, but from a seperate build-folder.
That makes it easy to clean everything, if there are too many changes or the build-system is broken for other reasons.

Just a rm -rf * from inside the build-folder and everything is really clean.

killerbot

okay, so I did :
- make distclean
- ./bootstrap
- ./configure --with-contrib-plugins=all
- make -j12
- sudo make install


==> does not make any difference


Loaded 0 plugins
Scanning for plugins in /usr/local/lib64/codeblocks/plugins
Tools Plus Plugin: Registering shell type Piped Process Control
Plugin manifest could not be parsed: /usr/local/share/codeblocks/FortranSmartIndent.zip
Invalid manifest file for: SmartIndentCpp
Invalid manifest file for: HDLSmartIndent
Invalid manifest file for: PascalSmartIndent
Plugin manifest could not be parsed: /usr/local/share/codeblocks/SmartIndentHDL.zip
Invalid manifest file for: SmartIndentPython
Invalid manifest file for: LuaSmartIndent
Invalid manifest file for: PythonSmartIndent
Plugin manifest could not be parsed: /usr/local/share/codeblocks/SmartIndentPascal.zip
Invalid manifest file for: SmartIndentFortran
Loaded 59 plugins


Darn autof***  :-(

killerbot

Quote from: jens on November 05, 2012, 08:45:29 PM
I suggest not to build C::B from the sources root, but from a seperate build-folder.
That makes it easy to clean everything, if there are too many changes or the build-system is broken for other reasons.

Just a rm -rf * from inside the build-folder and everything is really clean.

could you elaborate on this ?
with autotools build in a different folder ?

killerbot

#24
while I had "/usr/local/lib64/codeblocks/plugins/" open in dolphin,

I did ==> sudo make uninstall

==> all disappeared except :

-rwxr-xr-x 1 root root  1613 Nov  5 07:31 libCppSmartIndent.la
-rwxr-xr-x 1 root root 63650 Nov  5 07:31 libCppSmartIndent.so
-rwxr-xr-x 1 root root  1637 Nov  5 07:31 libFortranSmartIndent.la
-rwxr-xr-x 1 root root 38766 Nov  5 07:31 libFortranSmartIndent.so
-rwxr-xr-x 1 root root  1613 Nov  5 07:31 libHDLSmartIndent.la
-rwxr-xr-x 1 root root 47849 Nov  5 07:31 libHDLSmartIndent.so
-rwxr-xr-x 1 root root  1613 Nov  5 07:31 libLuaSmartIndent.la
-rwxr-xr-x 1 root root 38317 Nov  5 07:31 libLuaSmartIndent.so
-rwxr-xr-x 1 root root  1631 Nov  5 07:31 libPascalSmartIndent.la
-rwxr-xr-x 1 root root 39042 Nov  5 07:31 libPascalSmartIndent.so
-rwxr-xr-x 1 root root  1631 Nov  5 07:31 libPythonSmartIndent.la
-rwxr-xr-x 1 root root 38167 Nov  5 07:31 libPythonSmartIndent.so
-rwxr-xr-x 1 root root  1613 Nov  5 07:31 libXMLSmartIndent.la
-rwxr-xr-x 1 root root 43792 Nov  5 07:31 libXMLSmartIndent.so


I think there's something seriously wrong with out build scripts / makefiles


EDIT : new approach starting with
- rm -rf * in trunk and svn up
- usr/local/share/codeblocks ==> manualy deleted
- usr/local/include/codeblocks ==> manualy deleted
- usr/local/lib64/codeblocks ==> manualy deleted
and then the entire chain again ......... [will paste the result .....]

FAILURE :


zip -R /home/killerbot/CodeBlocks/trunk/src/plugins/contrib/SmartIndent/SmartIndentPython.zip manifest.xml
PWD=`pwd` cd . && \
cp manifest_lua.xml ./manifest.xml && \
zip -R /home/killerbot/CodeBlocks/trunk/src/plugins/contrib/SmartIndent/SmartIndentLua.zip manifest.xml
cp: cannot create regular file `./manifest.xml': File exists
 adding: manifest.xml (deflated 50%)
 adding: manifest.xmlmake[4]: *** [SmartIndentHDL.zip] Error 1
       zip warning:  file size changed while zipping manifest.xml
 adding: manifest.xml (stored 0%)
(deflated 50%)

damn damn damn

EDIT :
issued again :  make -j12  ==> continues till the end

then issued : sudo make install :  OK

and then we run it and we get (to be honest as expected  :-(   ) :

Loaded 0 plugins
Scanning for plugins in /usr/local/lib64/codeblocks/plugins
Tools Plus Plugin: Registering shell type Piped Process Control
Invalid manifest file for: SmartIndentCpp
Invalid manifest file for: SmartIndentHDL
Invalid manifest file for: SmartIndentPython
Invalid manifest file for: SmartIndentPascal
Loaded 55 plugins


There's something wrong with those SmartIndent, and it seems also not save to touch that area with a make -j12 ??
Never had any build problems before, but it seems SmartIndent is causing problems ...


oBFusCATed

1. Why don't you use packages? Provided by Jens or self build
2. Why don't you use prefix (--prefix=/home/myname/software/codeblocks for example), make uninstall is known to be unreliable, especially when there are changes to the filenames
3. For cleaner builds you can use something like:

./bootstrap
cd build
rm -rf *
`pwd`/../configure
make -jn
make install


Most of the time I stick to 1 and I'm happy...

This time I suspect there is some misery happening in the Makefiles, which is not 100% reliable.
What happens if you use make -j1?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

killerbot

#26
packages why ? I selfbuild CB like this for over then 7 years on linux, never any problems, and very often on more then 5-6 machines.

Why is the make uninstall not reliable ? Is it due to errors in the makefiles, could we correct it ?

Well I have done the cleanup myself as described, will do such cleanup again, and do a build with just 1 core, just to see what happens.
But it is only this SmartIndent which might have a problem, cause why would one not use the multiple cores (those 1 core days are over for me ;-)  )

I will come back with the 1 core result.

EDIT :  the one core build (aka , just : make) ==> OK, so this seems to indicate that the zipping process (??) is probably having a problem during a parallel build. Things still is, never saw any problem with the other plug-ins like that.

oBFusCATed

Quote from: killerbot on November 06, 2012, 07:40:33 AM
packages why ? I selfbuild CB like this for over then 7 years on linux, never any problems, and very often on more then 5-6 machines.
Your memory is pretty short, but the forum never forgets :)
Search the forum for all the topics you've started reporting there is a build problem and it turned out you've not used the correct commands.
I doubt the number will be less than 10  ;D

Quote from: killerbot on November 06, 2012, 07:40:33 AM
Why is the make uninstall not reliable ? Is it due to errors in the makefiles, could we correct it ?
Because it you do "svn update; make uninstall" it will break if there are changes to the file names :)
But you can check it yourself by searching you install dir for cb files after you've done a make uninstall :)

Quote from: killerbot on November 06, 2012, 07:40:33 AM
... cause why would one not use the multiple cores (those 1 core days are over for me ;-)  )
Because there might be parallel make issues...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

killerbot

you are correct I have run into issues, but that was very often pch problems (which seem to be the very nature of pch builds)  :P
and probably a few I don't remember, I can't even remember which wrong commands I used (could you please point them out to me again, would be good to have my mind refreshed   ;D )


But never such problem where actually the build process itself is screwing up things (like those manifest files / zip files getting broken (?) for SmartIndent with parallel build).

Correct that the uninstall, should happen before the svn up, or we should go for more "forced cleans", eg why clean fopr example /usr/local/lib64/codeblocks file per file, have make uninstall just delete that entire directory (same for /usr/local/include/codeblocks and /usr/local/share/codeblocks) ?
In the "/usr/local/lib64/" we also have 4 files related to libcodeblocks and libwxsmith (so the can still suffer from name change, but their names seem rather stable).

So could we adjust the makefile uninstall to just remove those directories (rm -rf - wise) at the end ?

Another thing I noticed, wxsmith appears next to it like :
/usr/local/include/wxsmith/
Why is this not a subdir of codeblocks directory?


Jenna

It might indeed be a problem with the zipping-processes.
It copies the appropriate manifest-file tomanifest.xml ancd then runs zip to pack it, if several of these steps run in parallel they might override (or try to override) the manifest.xml that is just used by another zip process.

This should be fixable by making the zip-processes depend on each other.

I will look into it as soon as possible.