Search Postgresql Archives

Re: Building Extension on Linux fails with relocation error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Binaek Sarkar <binaek@xxxxxxxxxx> 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 code that is built to
be dynamically relocatable, which as the error message suggests is
normally accomplished (with a C compiler) by specifying -fPIC.
You'll have to find out what is the equivalent incantation for Go;
but look for options for building shared libraries, not .a files.

> Interestingly, the *build completes successfully when the .a file is
> smaller* (around 100 MB).

Pure luck I suspect.

			regards, tom lane






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux