Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php/5.3.29/lib/libmemcached.so.11: file too short #358

Closed
3 of 5 tasks
glensc opened this issue Dec 7, 2020 · 6 comments
Closed
3 of 5 tasks

php/5.3.29/lib/libmemcached.so.11: file too short #358

glensc opened this issue Dec 7, 2020 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@glensc
Copy link

glensc commented Dec 7, 2020

Describe the bug

Appears that ext-memcached extension dependant library libmemcached.so.11 is truncated:

Warning: PHP Startup: Unable to load dynamic library '/home/runner/php/5.3.29/lib/php/extensions/no-debug-non-zts-20090626/memcached.so' - /home/runner/php/5.3.29/lib/libmemcached.so.11: file too short in Unknown on line 0

You can see the job output in this job:

Version

  • I have checked releases, and the bug exists in the latest patch version of v1 or v2.
  • v2
  • v1

Runners

  • GitHub Hosted
  • Self Hosted

Operating systems

PHP versions

5.3

To Reproduce

      - name: Setup PHP ${{ matrix.php }}
        uses: shivammathur/setup-php@v2
        with:
          php-version: 5.3
          extensions: memcached

      - name: Test ext-memcached
        run: |
          php -m
          php -r 'var_dump(extension_loaded("memcached"));'

Expected behavior

Screenshots/Logs

Additional context

Are you willing to submit a PR?

@glensc glensc added the bug Something isn't working label Dec 7, 2020
@shivammathur
Copy link
Owner

shivammathur commented Dec 8, 2020

@glensc
Thanks for reporting this. It should work now.
Test workflow: https://github.com/shivammathur/test-setup-php/actions/runs/407289989/workflow

@glensc
Copy link
Author

glensc commented Dec 8, 2020

@shivammathur thanks for the quick action! do you have a reference to commit/pr how you fixed it?

@shivammathur
Copy link
Owner

I just built the compatible libmemcached and the memcached extension again, and packaged it correctly.
The symlinks in the libmemcached files were not preserved the last time I packaged it.

shivammathur/php5-ubuntu@3e77eed

@glensc
Copy link
Author

glensc commented Dec 8, 2020

@shivammathur oh, it's binary uploaded from your computer. I was really hoping everything is automated and built from CI.

@shivammathur
Copy link
Owner

It requires ubuntu precise to build. The process and scripts for building PHP 5.3 are mostly same as PHP 8 build here using php-build.

The issue with building this is figuring out the compatible library versions and sourcing them. This process was painful and I had no will to write a ci workflow which repeats this, so I just archived the build.

Will try to opensource this, it will be easier for me also to maintain👍.

@glensc
Copy link
Author

glensc commented Dec 8, 2020

I think it's easiest to make the build process with docker, and later just docker cp (or similar) from the container if need to make .tar archive. that makes it possible to develop on macOS, Linux, Windows, and also use the same Dockerfile in CI (which are typically Linux). Dockerfile can then be tracked in Git.

Seeing how Travis did it, they just create tar of $HOME/.phpenv and unpack it in CI.

Some idea, how I would do this if I had a similar task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants