Bug 1215562 - pgloader built using objcopy to reduce executable size creates non-working package
Summary: pgloader built using objcopy to reduce executable size creates non-working pa...
Status: NEW
Alias: None
Product: openSUSE Distribution
Classification: openSUSE
Component: Development (show other bugs)
Version: Leap 15.4
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Jan Engelhardt
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-21 09:42 UTC by David Rankin
Modified: 2023-11-16 13:51 UTC (History)
4 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---
emiliano.langella: needinfo? (drankinatty)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Rankin 2023-09-21 09:42:31 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.
Comment 1 Emiliano Langella 2023-11-13 15:30:48 UTC
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?
Comment 2 Emiliano Langella 2023-11-13 15:44:18 UTC
As a workaround, could you please try to install the sbcl package?
Comment 3 Emiliano Langella 2023-11-13 17:33:40 UTC
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.
Comment 4 Jan Engelhardt 2023-11-13 17:53:10 UTC
created request id 1125710
Comment 5 Emiliano Langella 2023-11-16 13:51:51 UTC
@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