From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,de92eb048dc3c019 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news2.volia.net!news.banetele.no!uio.no!newsfeed.kolumbus.fi!feeder2.news.jippii.net!reader1.news.jippii.net!53ab2750!not-for-mail From: Tapio Kelloniemi Subject: Re: Library file locations (was: Debian Policy for Ada, Second Edition) References: <87hd5u843z.fsf@ludovic-brenta.org> Newsgroups: comp.lang.ada Message-ID: Date: Mon, 20 Mar 2006 09:07:24 GMT NNTP-Posting-Host: 217.30.176.187 X-Complaints-To: newsmaster@saunalahti.com X-Trace: reader1.news.jippii.net 1142845644 217.30.176.187 (Mon, 20 Mar 2006 11:07:24 EET) NNTP-Posting-Date: Mon, 20 Mar 2006 11:07:24 EET Organization: Saunalahti Customer Xref: g2news1.google.com comp.lang.ada:3474 Date: 2006-03-20T09:07:24+00:00 List-Id: Ludovic Brenta wrote: >Tapio Kelloniemi writes: >[...] >> However GCC searches for header files in /usr/include and >> /usr/local/include even when it is installed under /opt. If some >> other behaviour is desired, GCC specs must be modified. So either >> GNAT should also use the same specs machanism as the rest of GCC (we >> agree that GNAT should behave the same way as other compilers in >> GCC?) or it should: >> >> - Search from /usr/local if and only if it will be installed to /usr. >> and/or >> - Provide an easy way for system administrators to change the project search >> path. Perhaps a file like ada_project_path could be added to lib/gcc/*/* >> where ada_object_path and ada_source_path files may also reside. > >In particular, /usr/local is, by definition, for use by the system >administrator, and therefore falls outside the scope of any policy >defined by the operating system. Why GCC then looks for headers in /usr/local/include? Because many packages are installed in /usr/local by sysadmins and because /usr/local/include is in GCC's default search path, other packages can link against packages installed by admin without using absolute paths. Has anyone ever seen C code like: #include "/usr/local/include/readline/readline.h" What comes to setting ADA_PROJECT_PATH, I think it is just setting one more redundant environment variable. Editing a text file is much more elegant solution. > If you want GNAT to look in some >particular subdirectory of /usr/local, then use ADA_PROJECT_PATH or >"with" the fully qualified file name of your project files. Let us think that I'm to publish my application A in source format on my web site. The package is built with a command like: gnatmake -PA If my project file contains something like: with "/usr/share/ada/adainclude/florist.gpr"; with "/..."; with "/..."; Suddenly I'll get a lot of complaints that compiling my application is very frustrating because users must hassle with the absolute path definitions in my project file. >So, what exactly is the problem? Easy usage of libraries, no matter whether they are installed by a sysadmin or a distro. -- Tapio