<div dir="ltr"><div>Thank you so much for your help! </div><div><br></div>>Install it somewhere that's on ld's default search path (see ld --verbose).<br>>/usr/local/lib is likely on it and an arch variant too, but I'm not familiar<br>>with RHEL.<br>>This would be the third fix you noted. You shouldn't need to manually specify<br>>the search path afterwards.<div><br></div><div>Agreed! I'll try that.</div><div><br></div><div>Meanwhile, I've installed "opt" with "yum install llvm.x86_64" and make of plv8 is successful. I then proceeded with "make install" for plv8. But when creating plv8 extension into Postgres, I'm again getting library search issue. I'm posting here, as the error I'm getting is related to ld's search path (which we were already resolving in this thread)</div><div><br></div>------<br>sudo -u postgres psql<br>could not change directory to "/root/plv8-3.0.0": Permission denied<br>psql (13.3)<br>Type "help" for help.<br><br>postgres=# CREATE EXTENSION plv8;<br>ERROR:  **could not load library "/usr/lib64/pgsql/<a href="http://plv8-3.0.0.so">plv8-3.0.0.so</a>": libc++.so.1: cannot open shared object file: No such file or directory**<br>postgres=# exit<br>----------<div><br></div><div>---</div><div>s -ltrh /usr/lib64/pgsql/<a href="http://plv8-3.0.0.so">plv8-3.0.0.so</a><br>-rwxr-xr-x 1 root root 153M Dec 16 07:54 /usr/lib64/pgsql/<a href="http://plv8-3.0.0.so">plv8-3.0.0.so</a><br><br>ls -ltrh /usr/local/lib/libc++.so.1<br>-rwxr-xr-x 1 root root 1.1M Dec 15 12:16 /usr/local/lib/libc++.so.1<br></div><div>----</div><div><br></div><div><br></div><div>---</div><div> ldd /usr/lib64/pgsql/<a href="http://plv8-3.0.0.so">plv8-3.0.0.so</a><br>        linux-vdso.so.1 (0x00007ffd03f21000)<br>        librt.so.1 => /lib64/librt.so.1 (0x00007f708ec34000)<br>        libc++.so.1 => not found<br>        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f708e8b2000)<br>        libm.so.6 => /lib64/libm.so.6 (0x00007f708e572000)<br>        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f708e35c000)<br>        libc.so.6 => /lib64/libc.so.6 (0x00007f708dfb1000)<br>        /lib64/ld-linux-x86-64.so.2 (0x00007f7091178000)<br>        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f708dd93000)<br></div><div>----</div><div><br></div><div>--</div><div>ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012<br>SEARCH_DIR("=/usr/x86_64-redhat-linux/lib64")<br>SEARCH_DIR("=/usr/lib64")<br>SEARCH_DIR("=/usr/local/lib64")<br>SEARCH_DIR("=/lib64")<br>SEARCH_DIR("=/usr/x86_64-redhat-linux/lib")<br>SEARCH_DIR("=/usr/local/lib")<br>SEARCH_DIR("=/lib")<br>SEARCH_DIR("=/usr/lib")<br></div><div>----</div><div><br></div><div><br></div>I've tried copying <a href="http://plv8-3.0.0.so">plv8-3.0.0.so</a> into /usr/local/lib as this dir is in ld's search path. But still getting same error ould not load library "/usr/lib64/pgsql/<a href="http://plv8-3.0.0.so">plv8-3.0.0.so</a>": libc++.so.1: cannot open shared object file: No such file or directory<div><code style="box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:11.9px;padding:0.2em 0.4em;margin:0px;border-radius:6px;color:rgb(36,41,47)"><br></code></div><div><code style="box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:11.9px;padding:0.2em 0.4em;margin:0px;border-radius:6px;color:rgb(36,41,47)"><span style="font-family:-apple-system,"system-ui","Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px">Any idea/guidance ? Please.</span><br></code></div><div><code style="box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:11.9px;padding:0.2em 0.4em;margin:0px;border-radius:6px;color:rgb(36,41,47)"><br></code></div><div>Thanks!</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 16 Dec 2021 at 02:15, Raul Tambre <<a href="mailto:raul@tambre.ee">raul@tambre.ee</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> > Is there a better way than above 3 (manual fixes) to add <br>
"/usr/local/lib/x86_64-unknown-linux-gnu" in id's search path?<br>
<br>
Install it somewhere that's on ld's default search path (see ld --verbose).<br>
/usr/local/lib is likely on it and an arch variant too, but I'm not familiar <br>
with RHEL.<br>
This would be the third fix you noted. You shouldn't need to manually specify <br>
the search path afterwards.<br>
</blockquote></div>