Bugzilla – Bug 1215562
pgloader built using objcopy to reduce executable size creates non-working package
Last modified: 2023-11-16 13:51:51 UTC
pgloader 3.6.9 from from the backports repository for Leap 15.4 built from http://download.opensuse.org/update/leap/15.4/backports/src/pgloader-3.6.9-bp154.2.1.src.rpm produces a non-working executable resulting in the following when invoked: $ pgloader mysql://david:password@localhost/webauth postgresql:///webauth fatal error encountered in SBCL pid 19105 tid 19105: Can't find sbcl.core The problem is due to the use of objcopy to reduce the executable from ~23M to ~300k due to a quirk in how the sbcl package creates the elf executables (details in the pgloader.spec file). While a great idea to get rid of the gaps in the executable and empty debug sections, it isn't resulting in a working pgloader executable. If you simply install -Dm755 ... the whole 23M executable, all is well. So basically a working package can be created by deleting the objcopy line and adding: install -Dm0755 bin/pgloader %{buildroot}%{_bindir}/pgloader It would be great if you can find out why the sbcl.core error is thrown and update the objcopy approach so we get the reduction in size. But here, the fat executable is working while the objcopy thinned-down version is not.
Can you reproduce the error using pgloader with --version or --help? If not, could you tell me the precise steps to reproduce it, including creating a MySQL database?
As a workaround, could you please try to install the sbcl package?
For your information, I was able to reproduce the error: # ./pgloader fatal error encountered in SBCL pid 17906 tid 17906: Can't find sbcl.core I can also confirm that the workaround from comment#2 doesn't work.
created request id 1125710
@David, could you please try the new version[1] of pgloader that should be released soon on TW? [1] https://build.opensuse.org/request/show/1126548