Subject: Unable to compile postgresql-18.1

From: Ibrahim Shaame <[email-masked]>
Date: Fri, 2 Jan 2026 21:23:58 +0300

Hello there
I have tried to compile from source postgresql-18.1 but it fails and I get
the following error:

gcc: fatal error: cannot read spec file ‘./specs’: Is a directory
compilation terminated.
make[2]: *** [<builtin>: isolationtester.o] Error 1
make[2]: Leaving directory
'/data/dwnlds/dwnld_slack/postgresql-18.1/src/test/isolation'
make[1]: *** [Makefile:42: all-test/isolation-recurse] Error 2
make[1]: Leaving directory '/data/dwnlds/dwnld_slack/postgresql-18.1/src'
make: *** [GNUmakefile:11: all-src-recurse] Error 2

Last compilation of postgresql-18.0 worked perfectly without issue and on
the same laptop
Any suggestions?

I am on : Slackware64 Linux 15.0 (Current)
Acer E5-771 laptop

---

From: Erik Wienhold <[email-masked]>
Date: Sun, 18 Jan 2026 17:29:00 +0100

> I am on : Slackware64 Linux 15.0 (Current)

What are exact build commands you've executed?

Could be that LIBRARY_PATH contains an empty path.  For example, I can
reproduce it with:

	export LIBRARY_PATH=
	make clean world-bin

-- 
Erik Wienhold

---

From: Ibrahim Shaame <[email-masked]>
Date: Wed, 21 Jan 2026 09:49:07 +0300

Hello Erik,
Thank you for the response. As for LIBRARY_PATH, I have always manually
compiled postgresql and I don't explicitly mention the LIBRARY_PATH
directory. That's why I am surprised why this time with this subversion
doesn't work just as it worked in the last version.

Thanks
Ibrahim

---

From: Ibrahim Shaame <[email-masked]>
Date: Wed, 21 Jan 2026 11:52:17 +0300

I have manually directed the LD_LIBRARY_PATH to /usr/lib64 but I get the
same error message.
Any suggestions?
Thanks
Ibrahim Shaame

On Wed, Jan 21, 2026 at 9:49 AM Ibrahim Shaame <[email-masked]> wrote:

>> > make[1]: Leaving directory
>> '/data/dwnlds/dwnld_slack/postgresql-18.1/src'

---

From: Pierre Forstmann <[email-masked]>
Date: Wed, 21 Jan 2026 13:42:56 +0100

As already requested, please answer following questions with lots of 
details;

Le 21/01/2026 à 09:52, Ibrahim Shaame a écrit :
> I have manually directed the LD_LIBRARY_PATH to /usr/lib64 but I get 
> the same error message.
> Any suggestions?
> Thanks
> Ibrahim Shaame
>
>     Thank you for the response. As for LIBRARY_PATH, I have always
>     manually compiled postgresql and I don't explicitly mention the
>     LIBRARY_PATH directory. That's why I am surprised why this time
>     with this subversion doesn't work just as it worked in the last
>     version.
>
>     Thanks
>     Ibrahim
>

---

From: Tom Lane <[email-masked]>
Date: Wed, 21 Jan 2026 10:56:03 -0500

> doesn't work just as it worked in the last version.

There is nothing in that area that we changed between 18.0 and 18.1;
moreover, if we had broken something like that, it's highly unlikely
that nobody but you would have noticed.  You need to look at what
changed in your build environment.

gcc seems to be getting confused by the fact that src/test/isolation
contains a subdirectory named "specs", but that's been there for
years.  The most likely explanation is that some environment variable
is causing gcc to look in the current directory for its spec file
(although I don't see any documentation of such a variable in the
gcc manual).  It's also plausible I guess that you have a corrupted
gcc installation.

			regards, tom lane

---

From: Ibrahim Shaame <[email-masked]>
Date: Thu, 22 Jan 2026 05:54:39 +0300

Thank you Pierre. As for build command, I don't use any special commands. I
just configure with some options and then issue "make" or "make world"
commands, leaving everything else standard as it came with the sources.
Thanks again

Ibrahim

---

From: Ibrahim Shaame <[email-masked]>
Date: Thu, 22 Jan 2026 05:59:28 +0300

Thank you Tom
I will try to change my environment ( reinstall GCC and will let you know.
Thanks again
Ibrahim

---

From: Ibrahim Shaame <[email-masked]>
Date: Tue, 27 Jan 2026 17:31:12 +0300

Hello there.
Yes it was a problem with my environment. I don't know exactly what caused
the problem. But after reinstall of the system the compilation went well
and the problem is solved.
Thank you everyone for your help
Ibrahim Shaame