Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-05

how to disable case sensitivity for file names on *nix?

8 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

waldo kitty

i'm using git to pull a project from sourceforge to a windows box and to a linux box... on windows, the project compiles fine... on linux, though, all of the files' names are lowercase but the sources have upper and CaMeL cased file names in the uses and include statements... i have no control over the project or the git repository it originates from...

i surely don't want to have to edit the sources to lowercase all the uses and includes statements every time i update my local repositories... how can i get it to compile on linux no matter what case the names are? is there anything i can do on my side of the fence to tell fpc to operate case insensitive? hopefully a simple command line option i can easily add to my build script?

NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted.

Reply by email

Michael Van Canneyt
to waldo kitty
waldo kitty wrote 13 lines
i'm using git to pull a project from sourceforge to a windows box and to a linux box... on windows, the project compiles fine... on linux, though, all of the files' names are lowercase but the sources have upper and CaMeL cased file names in the uses and include statements... i have no control over the project or the git repository it originates from... i surely don't want to have to edit the sources to lowercase all the uses and includes statements every time i update my local repositories... how can i get it to compile on linux no matter what case the names are? is there anything i can do on my side of the fence to tell fpc to operate case insensitive? hopefully a simple command line option i can easily add to my build script?

Normally, it should compile if all filenames are lowercase.

Michael.

Reply by email

Graeme Geldenhuys
to waldo kitty: i'm using git to pull a project from sourceforge to a windows box and to a linux box...…
waldo kitty wrote
box... on windows, the project compiles fine... on linux, though, all of the files' names are lowercase but the sources have upper and CaMeL cased file names in the uses and include statements...

That is the normal way of doing things, and should work fine. At least that is how most of my commercial software was been written (work shared with ex-Delphi developers that like CaMel case in uses clauses).

includes statements every time i update my local repositories... how can i get it to compile on linux no matter what case the names are?

I don't believe ext2/3/4 has a case-insensitive option. If you use JFS (used to be my preferred file system under Linux - originally developed by IBM), there is a case-insensitive option at the time you create the file system.

The best file system (in my opinion) is to use ZFS. It comes standard with FreeBSD, and Linux now has good support for ZFS too, but it must be user installed, due to incompatible licensing. As with all the awesome features included with ZFS, you can set case sensitivity whenever you need on whatever "partition" you create. NOTE: ZFS "partitions" are nothing like traditional file systems. You can create and destroy them at will (almost like directories).

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Sven Barth
to waldo kitty: i'm using git to pull a project from sourceforge to a windows box and to a linux box...…
waldo kitty wrote 6 lines
i'm using git to pull a project from sourceforge to a windows box and to a linux box... on windows, the project compiles fine... on linux, though, all of the files' names are lowercase but the sources have upper and CaMeL cased file names in the uses and include statements... i have no control over the project or the git repository it originates from...

FPC will look for each unit and include file (including directory names) in lowercase, UPPERCASE and AsWritten (AFAIK even in that order)

Show quoted text 7 lines
i surely don't want to have to edit the sources to lowercase all the uses and includes statements every time i update my local repositories... how can i get it to compile on linux no matter what case the names are? is there anything i can do on my side of the fence to tell fpc to operate case insensitive? hopefully a simple command line option i can easily add to my build script?

You can't tell FPC to operate in a totally case insensitive way, because then the compiler would need to check for ANY possible spelling of the filename (plus extension), because if an underlying filesystem is case sensitive then a.pas would be different from A.PAS which would also be different from a.PAS as well as A.pas and so on...

Regards,
Sven

Reply by email

waldo kitty
to Michael Van Canneyt: Normally, it should compile if all filenames are lowercase. Michael.
Michael Van Canneyt wrote 8 lines
On Sat, 10 May 2014, waldo kitty wrote: > i surely don't want to have to edit the sources to lowercase all the uses and > includes statements every time i update my local repositories... how can i get > it to compile on linux no matter what case the names are? is there anything i > can do on my side of the fence to tell fpc to operate case insensitive? > hopefully a simple command line option i can easily add to my build script? Normally, it should compile if all filenames are lowercase.

interesting...

NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted.

Reply by email

waldo kitty
to Sven Barth: FPC will look for each unit and include file (including directory names) in lowercase,…
Sven Barth wrote 10 lines
On 10.05.2014 20:09, waldo kitty wrote: > > i'm using git to pull a project from sourceforge to a windows box and to > a linux box... on windows, the project compiles fine... on linux, > though, all of the files' names are lowercase but the sources have upper > and CaMeL cased file names in the uses and include statements... i have > no control over the project or the git repository it originates from... FPC will look for each unit and include file (including directory names) in lowercase, UPPERCASE and AsWritten (AFAIK even in that order)

maybe this is not the problem i'm facing, then... i'll have to dig deeper into the build script... it is a very simple build script but there may be a bug in it with an environment variable it sets for the library files...

Show quoted text 12 lines
> i surely don't want to have to edit the sources to lowercase all the > uses and includes statements every time i update my local > repositories... how can i get it to compile on linux no matter what case > the names are? is there anything i can do on my side of the fence to > tell fpc to operate case insensitive? hopefully a simple command line > option i can easily add to my build script? You can't tell FPC to operate in a totally case insensitive way, because then the compiler would need to check for ANY possible spelling of the filename (plus extension), because if an underlying filesystem is case sensitive then a.pas would be different from A.PAS which would also be different from a.PAS as well as A.pas and so on...

yes, i remember the discussion some time (several years?) back... i spent some time rereading over it before making my post, too...

thank you to you and michael van canneyt for your responses...

NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted.

Reply by email

Sven Barth
to waldo kitty
"waldo kitty" wrote 14 lines
On 5/10/2014 5:14 PM, Sven Barth wrote: > > On 10.05.2014 20:09, waldo kitty wrote: >> >> >> i'm using git to pull a project from sourceforge to a windows box and to >> a linux box... on windows, the project compiles fine... on linux, >> though, all of the files' names are lowercase but the sources have upper >> and CaMeL cased file names in the uses and include statements... i have >> no control over the project or the git repository it originates from... > > > FPC will look for each unit and include file (including directory names)

in

> lowercase, UPPERCASE and AsWritten (AFAIK even in that order) maybe this is not the problem i'm facing, then... i'll have to dig deeper

into the build script... it is a very simple build script but there may be a bug in it with an environment variable it sets for the library files...

You could add the option -vut to see which files the compiler tries to use (t) and which it does then finally use (u). Be aware though that this might get noisy ;)

Regards,
Sven

Reply by email

waldo kitty
to Sven Barth
Sven Barth wrote
You could add the option -vut to see which files the compiler tries to use (t) and which it does then finally use (u). Be aware though that this might get noisy ;)

i thought i had replied back in this thread that i had found the problem... i used -vav and finally saw that i had a typo in the -Fu and -Fi entries... one character too many or lacking can make all the difference :/

NOTE: No off-list assistance is given without prior approval. Please *keep mailing list traffic on the list* unless private contact is specifically requested and granted.

Reply by email