This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to handle length limit of PATH environment variable

Am 05.04.2018 um 11:19 schrieb Peter Bauer:

i was bitten by the length limit of the PATH variable of 4095 characters (see [1]) and could not find a way around it. This means i have a lot of software packages in different directories and each of them adds itself to the PATH so one can run the executables and have the shared libs available.

As far as DLLs are concerned, that would be a misuse of the PATH. AFAIK they will already be found by being in the same directory as the executable that needs them.

Under Windows there is the "short path workaround" but what to do under Cygwin?

Being Cygwin, you should do what Unix has always done: do away with the whole idea that every program needs an entire directory tree of its own. The promise that this would somehow make separate installation and, more importantly, un-installation or update of program packages much easier was never really kept, anyway.

I.e. you shoule have _one_ tree like thone below /usr, instead of dozens of c:/programs/manufacturer/package trees. And while maintaining such a collection on Windows might seem nightmarish, tools like "stow" make it quite manageable on a Unix-style platform, with Unix-style software packages. With stow, it works like this for a typical autoconf'ed package:

	.../configure --prefix=somewhere
	make install prefix=somewhere/.stow/packagename
	pushd somewhere/.stow/
	stow packagename

Stow then builds and maintains a thicket of symlinks from "somewhere" into the individual packages' trees under "somewhere/.stow" such that the packages work just as if they had actually been installed directly into "somewhere", while they're still separate and can be updated or uninstalled individually. Sometimes package have to be massaged bit (e.g. for GNU info 'dir' files), but it works remarkably well given how simple it is, at heart.

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]