Re: Building Extension on Linux fails with relocation error

2023-12-22 Thread Tom Lane
"Peter J. Holzer" writes: > On 2023-12-22 10:31:14 -0500, Tom Lane wrote: >> Binaek Sarkar writes: >>> Interestingly, the *build completes successfully when the .a file is >>> smaller* (around 100 MB). >> Pure luck I suspect. > I seem to remember a 256MB limit for position independent code on x

Re: Building Extension on Linux fails with relocation error

2023-12-22 Thread Peter J. Holzer
On 2023-12-22 10:31:14 -0500, Tom Lane wrote: > Binaek Sarkar writes: > > The issue arises with a Go module that is compiled into a .a archive file > > using -buildmode=c-archive, leading to a *file size of approximately 393 > > MB*. [...] > > Interestingly, the *build completes successfully when

Re: Building Extension on Linux fails with relocation error

2023-12-22 Thread Tom Lane
Binaek Sarkar writes: > The issue arises with a Go module that is compiled into a .a archive file > using -buildmode=c-archive, leading to a *file size of approximately 393 MB*. I am not sure exactly what "-buildmode=c-archive" does, but it doesn't sound like it is doing what you need. You need

Building Extension on Linux fails with relocation error

2023-12-22 Thread Binaek Sarkar
I am new to PostgreSQL extension development and am currently working on the *steampipe-postgres-fdw* project. This is a *Foreign Data Wrapper (FDW) written in Go*, and while I have successfully built it on Darwin systems, I am facing challenges when building on Linux, particularly with *pgxs.mk <