Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

[5.0.0] Impossible to build offline #493

Closed
remicollet opened this issue Jun 27, 2022 · 13 comments
Closed

[5.0.0] Impossible to build offline #493

remicollet opened this issue Jun 27, 2022 · 13 comments
Milestone

Comments

@remicollet
Copy link
Contributor

The build system seems terrible (and fragile) as it downloads tons of things, so it cannot be run offline.

Version 4.x was buildable with some hack to use system grpc

FYI, I will have to stop providing RPMs of this extension for Fedora/RHEL/CentOS...

And even online a try fails...

...
   Compiling ipc-channel v0.16.0
   Compiling hyper v0.14.18
   Compiling SkyAPM-php-sdk v1.0.0 (/dev/shm/BUILD/php-pecl-skywalking-5.0.0/NTS)
error: failed to run custom build command for `SkyAPM-php-sdk v1.0.0 (/dev/shm/BUILD/php-pecl-skywalking-5.0.0/NTS)`

Caused by:
  process didn't exit successfully: `/dev/shm/BUILD/php-pecl-skywalking-5.0.0/NTS/target/release/build/SkyAPM-php-sdk-5089d13374504935/build-script-build` (exit status: 1)
  --- stderr
  Error: Custom { kind: Other, error: "protoc failed: ./src/protocol/: warning: directory does not exist.\nCould not make proto path relative: ./src/protocol/language-agent/Tracing.proto: No such file or directory\n" }
warning: build failed, waiting for other jobs to finish...

@helingfeng
Copy link

helingfeng commented Jun 30, 2022

git submodule update --init --recursive

@remicollet
Copy link
Contributor Author

I mean using the pecl archive
https://pecl.php.net/get/skywalking-5.0.0.tgz

@heyanlong
Copy link
Member

@remicollet I upgrade now to fix this. Hope to continue providing RPMs on Fedora/RHEL/CentOS

@heyanlong
Copy link
Member

@remicollet I tested it and release a new version
https://pecl.php.net/get/skywalking-5.0.1.tgz

@remicollet
Copy link
Contributor Author

Doesn't solve the main issue "Impossible to build offline"


    Updating crates.io index
warning: spurious network error (2 tries remaining): failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)
warning: spurious network error (1 tries remaining): failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)
error: Unable to update registry `crates-io`

Caused by:
  failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  network failure seems to have happened
  if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
  https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by:
  failed to resolve address for github.com: Temporary failure in name resolution; class=Net (12)

@remicollet
Copy link
Contributor Author

The possible ways for packaging

  • 1/ follow official packaging Guidelines for rust library

and use system registry, i.e. /usr/share/cargo/registry

Problem: some dependencies are not available (ipc-channel, tonic, local-ip-address)

And rust is out of my skills

  • 2/ use bundled registry

Terribly big (~300MB)

  • 3/ allow network during the build

Against all good practices
Sounds terrible, and be will very long

@remicollet
Copy link
Contributor Author

I use "2" as a temporary workaround (but this is only a workaround)

So https://twitter.com/RemiRepository/status/1542505699619373056

BTW:

  • build is long (~1h for 6 PHP versions * 6 distros * 2 builds)
  • sources RPM is huge with ~300MB
  • extension is big with ~1MB (most ext are <100KB)

@heyanlong
Copy link
Member

I try the Rust vendor and delete Win32 api rust-lang/cargo#7058, final get ~140MB vendor, is it ok if vendor packed to PECL?

@heyanlong
Copy link
Member

@jmjoy Is there a way to reduce the vendor

@remicollet
Copy link
Contributor Author

@heyanlong indeed using the vendor feature helps a lot reducing sources size from 300MB to 30Mb

is it ok if vendor packed to PECL?

don't know ;)
using bundled library is still bad practice (especially from packaging PoV)
and, as explained, only a workaround

don't know if other users really care, as "pecl install" is working online by design ;)

@jmjoy
Copy link
Member

jmjoy commented Jul 1, 2022

@jmjoy Is there a way to reduce the vendor

Archive the vendor directory and unarchive when build?

@heyanlong
Copy link
Member

@jmjoy Good idea, maybe just do this

@wu-sheng
Copy link
Member

Fixed through edd699c in 5.0.1

@wu-sheng wu-sheng added this to the 5.0.1 milestone Jul 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants