Author Topic: SmartIndent refactoring question  (Read 30102 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: SmartIndent refactoring question
« Reply #15 on: November 05, 2012, 08:45:20 am »
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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: SmartIndent refactoring question
« Reply #16 on: November 05, 2012, 09:36:08 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: SmartIndent refactoring question
« Reply #17 on: November 05, 2012, 10:30:43 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 .

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: SmartIndent refactoring question
« Reply #18 on: November 05, 2012, 10:54:47 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: SmartIndent refactoring question
« Reply #19 on: November 05, 2012, 08:10:36 pm »
today : svn up + make clean + make + sudo make install

It even got worse :
Code
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

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: SmartIndent refactoring question
« Reply #20 on: November 05, 2012, 08:31:32 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: SmartIndent refactoring question
« Reply #21 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.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: SmartIndent refactoring question
« Reply #22 on: November 05, 2012, 11:42:09 pm »
okay, so I did :
- make distclean
- ./bootstrap
- ./configure --with-contrib-plugins=all
- make -j12
- sudo make install


==> does not make any difference

Code
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***  :-(

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: SmartIndent refactoring question
« Reply #23 on: November 05, 2012, 11:42:54 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 ?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: SmartIndent refactoring question
« Reply #24 on: November 05, 2012, 11:45:37 pm »
while I had "/usr/local/lib64/codeblocks/plugins/" open in dolphin,

I did ==> sudo make uninstall

==> all disappeared except :
Code
-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 :

Code
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  :-(   ) :
Code
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 ...

« Last Edit: November 06, 2012, 12:01:40 am by killerbot »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: SmartIndent refactoring question
« Reply #25 on: November 06, 2012, 12:17:22 am »
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:
Code
./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!]

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: SmartIndent refactoring question
« Reply #26 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.

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.
« Last Edit: November 06, 2012, 08:04:12 am by killerbot »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: SmartIndent refactoring question
« Reply #27 on: November 06, 2012, 07:52:52 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

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 :)

... 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!]

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5491
Re: SmartIndent refactoring question
« Reply #28 on: November 06, 2012, 08:12:19 am »
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?


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: SmartIndent refactoring question
« Reply #29 on: November 06, 2012, 09:12:03 am »
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.