about cross-compiling issue
about cross-compiling issue
От:
"陈亚杰" <1441147871@qq.com>
Дата:
Hello, I have a question about cross-compiling. I get an error when doing initdb for postgresql for arm64 architecture devices.
The error information is Error relocating /data/postgresql/postgresql-16.3-arm64-v8a-build/tmp_install/usr/postgresql/arm64-v8a/lib/dict_snowball.so: palloc0: symbol not found.
In fact, the library exists in this directory, and the palloc symbol exists but is not defined.
Any tips to go around this issue?
Thanks!
Re: about cross-compiling issue
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"=?utf-8?B?6ZmI5Lqa5p2w?=" <1441147871@qq.com> writes: > Hello, I have a question about cross-compiling. I get an error when doing initdb for postgresql for arm64 architecture devices. > The error information is Error relocating /data/postgresql/postgresql-16.3-arm64-v8a-build/tmp_install/usr/postgresql/arm64-v8a/lib/dict_snowball.so: palloc0: symbol not found. We don't really support cross-compiling, because there are too many things that the configure script can't check for if it can't run a test program. In this particular case I think what is biting you is that configure won't add -Wl,--export-dynamic to the backend link switches. You might think that that shouldn't require a test program to verify, but c-compiler.m4 says differently: # Given a string, check if the compiler supports the string as a # command-line option. If it does, add to the given variable. # For reasons you'd really rather not know about, this checks whether # you can link to a particular function, not just whether you can link. # In fact, we must actually check that the resulting program runs :-( This check dates to 2008, and maybe it's no longer necessary on any modern system, but I'm unexcited about trying to find out. regards, tom lane
Re:about cross-compiling issue
От:
"Long Song" <songlong88@126.com>
Дата:
Hi Chen Yajie,
Your provided information is fuzzy, so I can only give some simple suggestions:
1. Use `file dict_snowball.so` to see the detail info of dict_snowball.so, maybe you can get some useful hint.
2. Use gdb to debug the initdb processing, then you can get more detail error info. That will help you figuring out the reason that initdb not working.
At 2024-05-23 16:08:05, "陈亚杰" <1441147871@qq.com> wrote:
Hello, I have a question about cross-compiling. I get an error when doing initdb for postgresql for arm64 architecture devices.The error information is Error relocating /data/postgresql/postgresql-16.3-arm64-v8a-build/tmp_install/usr/postgresql/arm64-v8a/lib/dict_snowball.so: palloc0: symbol not found.In fact, the library exists in this directory, and the palloc symbol exists but is not defined.Any tips to go around this issue?Thanks!