weird problem with file system mode (*NIX)

General questions regarding the usage of CodeLite
varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

weird problem with file system mode (*NIX)

Post by varnie »

good day.

while using CodeLite i sometimes run into weird problem related to file system mode of file "main.cpp". (i am using FreeBSD OS). here's my misunderstanding in details: i'm creating a new project in CodeLite IDE, programming logic and invoke Build Project/F7 button. thereafter i _sometimes_ get an error saying it is impossible to save "main.cpp" file and its compilation gets failed.
after looking on my "main.cpp" file i see that there's no "w" rights set on it. if i invoke "ls -la" UNIX shell command, it shows me "-r--r--r--" mode for my "main.cpp" file (btw, all other project's cpp files have right file modes). i fix this problem by additional executing "chmod +x main.cpp" and after that everything goes fine...
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: weird problem with file system mode (*NIX)

Post by eranif »

Several questions:

Does this happen only when u create new project (of type executable)?

What is the permission of the file: ~/.codelite/templates/projects/executable/main.cpp ?

If you create a file with:

Code: Select all

touch myfile.txt
what is the permission of the created file?

Eran
Make sure you have read the HOW TO POST thread
varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: weird problem with file system mode (*NIX)

Post by varnie »

eranif wrote: Does this happen only when u create new project (of type executable)?
don't know, because i've never tried CodeLite for programming and compiling libraries, but for executable files only.
but yes, it happens only when i create new* project and try to build it.
eranif wrote: What is the permission of the file: ~/.codelite/templates/projects/executable/main.cpp ?
wow! here it is:
-r--r--r--
there's no "w" bit on it! have no clue why so.
eranif wrote: If you create a file with:

Code: Select all

touch myfile.txt
what is the permission of the created file?Eran
then its permission will be:
-rw-r--r--
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: weird problem with file system mode (*NIX)

Post by eranif »

Well, I think that the solution is obvious:

Code: Select all

chmod +w ~/.codelite/templates/projects/executable/main.cpp
When you create new project, this is the default main.cpp file which is copied to your new project directory.
The reason no one experienced this before is because you are running a FreeBSD, which means that you are not using any installer, hence, main.cpp has the SVN permissions (which are r-r-r)

Eran
Make sure you have read the HOW TO POST thread
varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: weird problem with file system mode (*NIX)

Post by varnie »

thank you, now it's okey.
i hope you will commit these tiny "fixes" for FreeBSD port version of CodeLite in future. or am i wrong and you don't plan to pay too much attention to FreeBSD version? just interesting.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: weird problem with file system mode (*NIX)

Post by eranif »

varnie wrote:or am i wrong and you don't plan to pay too much attention to FreeBSD version? just interesting.
NOT true - look at the forum and see that I spent a lot of time trying to make things working properly on FreeBSD - and I plan to continue doing so.

However, since I dont have FreeBSD, I need your (or other FreeBSD users) feedback.

For start, how did you install CodeLite?
Do you download the source files, and built it your self?

If this is the case, then I can fix installation bugs in the 'install' target of the makefile.

All bugs are created equally ;), so create one here: http://sourceforge.net/tracker/?func=ad ... tid=979960
Once opened it will not get lost.

Eran
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: weird problem with file system mode (*NIX)

Post by eranif »

I fixed it in the SVN, the proper solution was to fix the ./configure script.

Eran
Make sure you have read the HOW TO POST thread
varnie
CodeLite Veteran
Posts: 64
Joined: Wed Jun 11, 2008 3:48 am
Contact:

Re: weird problem with file system mode (*NIX)

Post by varnie »

have had absolutely no problems during CodeLite's installation in FreeBSD. i've installed it directly from FreeBSD ports collection. so, CodeLite's port is here: /usr/ports/editors/codelite. on this moment it is "codelite-r1599.tar.bz2" (i know the newer version is available for downloading on sourceforge, but i guess the official FreeBSD port's managers/suppliers still have had no time to commit fresh CodeLite's version to FreeBSD ports system. it's a matter of time i think).
well, back to installation procedure:
cd /usr/ports/editors/codelite
su
make install clean
after executing these commands, we have downloaded, configured and compiled CodeLite IDE on our desktop machine :)
that's all. for your information about how did i find this path, it is pretty simple. we can "cd /usr/ports" and execute "make search key='codelite'" and we'll have listing of codelites description and path, saying it is located in /usr/ports/editors/codelite.

if you have any FreeBSD related questions about using CodeLite, you are welcome to ask me. :)
Post Reply