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

Compile source code #1355

Open
73hulu opened this issue Jan 3, 2024 · 7 comments
Open

Compile source code #1355

73hulu opened this issue Jan 3, 2024 · 7 comments

Comments

@73hulu
Copy link

73hulu commented Jan 3, 2024

How to compile and package source code locally offline

Copy link

github-actions bot commented Jan 3, 2024

Thank you @73hulu for creating this issue. If this is in regards to a defect, product question or feature request: you should use our support portal at https://support.fossa.com to file a request, as you would receive more immediate support.

@csasarak
Copy link
Contributor

csasarak commented Jan 3, 2024

Instructions for building can be found in our contributor documentation. Note that we include a few proprietary components which will not be available for third-parties to use while building, so some functions of the FOSSA CLI will be limited. Also note that we are limited in our ability to support users using unofficial builds. Please use official releases of the CLI for production work or evaluation purposes.

@73hulu
Copy link
Author

73hulu commented Jan 4, 2024

Run the cabal build command in the root directory of the project. A dependency error message is displayed. Check that there is no spectrometer package in the official dependency package warehouse。

The error log is as follows:
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: cpio-conduit-0.7.3 (user goal)
[__1] trying: base-4.17.2.1/installed-4.17.2.1 (dependency of cpio-conduit)
[__2] next goal: spectrometer (user goal)
[__2] rejecting: spectrometer-0.1.0.0 (conflict:
base==4.17.2.1/installed-4.17.2.1, spectrometer => base^>=4.15)
[__2] fail (backjumping, conflict set: base, spectrometer)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, spectrometer, cpio-conduit

@csasarak
Copy link
Contributor

csasarak commented Jan 4, 2024

spectrometer is the internal name of the package we develop in this repository. It isn't distributed on hackage and we don't currently have any plans to distribute it there. With some more details I may be able to offer assistance:

  • Do you have an up-to-date cabal package index? (cabal update will refresh it).
  • What versions of ghc (ghc --version) and cabal (cabal --version) are you using? Currently we only use GHC 9.4.7 to develop spectrometer and don't support other versions. Did you install them via ghcup or from some other source?
  • Are you trying to consume spectrometer as a library in some other package?
  • What is the exact command you used to produce that output?
  • What revision are you trying to build? Is it the latest master?
  • cabal should clone several repositories with dependencies as defined in cabal.project. Did that happen successfully? Where is that output?
  • Have you made any modifications before trying to build?

To me, this message looks like you're trying to build a version of spectrometer which requires base 4.15 when cpio-conduit requires base 4.17, which is a conflict. I checked though, and both the version of cpio-conduit we reference in cabal.project and spectrometer have version bounds compatible with base 4.17.2.1.

@73hulu

This comment was marked as abuse.

@73hulu
Copy link
Author

73hulu commented Jan 4, 2024

fossa-cli is only a client, there is no way to resolve the package dependencies in the project, but now the project is running on the Intranet environment, can not access the external network, can not access https://app.fossa.com, what should I do?

@csasarak
Copy link
Contributor

csasarak commented Jan 4, 2024

You should use the contributing guide for that version, which was using ghc 9.0 and base 4.15.

Regarding accessing https://app.fossa.com, that is something I think that the team managing the intranet/firewalls would be able to help with better than I can since that configuration is specific to your organization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants