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

[Build] Stack build error #742

Closed
hyunsooda opened this issue Nov 25, 2024 · 5 comments
Closed

[Build] Stack build error #742

hyunsooda opened this issue Nov 25, 2024 · 5 comments

Comments

@hyunsooda
Copy link

❯ stack build
duckling> build (lib + exe) with ghc-8.8.4
Preprocessing library for duckling-0.2.0.0..
Building library for duckling-0.2.0.0..
Preprocessing executable 'duckling-expensive' for duckling-0.2.0.0..
Building executable 'duckling-expensive' for duckling-0.2.0.0..

<no location info>: error:
    output was redirected with -o, but no output will be generated
because there is no Main module.


Error: [S-7282]
       Stack failed to execute the build plan.

       While executing the build plan, Stack encountered the error:

       [S-7011]
       While building package duckling-0.2.0.0 (scroll up to its section to see the error) using:
       /home/hyunsoo/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_6HauvNHV_3.0.1.0_ghc-8.8.4 --verbose=1 --builddir=.stack-work/dist/x86_64-linux/ghc-8.8.4 build lib:duckling exe:custom
-dimension-example exe:duckling-example-exe exe:duckling-expensive exe:duckling-regen-exe exe:duckling-request-sample --ghc-options " -fdiagnostics-color=always"
       Process exited with code: ExitFailure 1

I installed the required packages through sudo apt-get install libpcre3 libpcre3-dev before the build. Once installed, stack build displays compile error without helpful failure information. Anybody can help?

OS: Ubuntu 24.04 LTS x86_64

@abolfazlakbary
Copy link

abolfazlakbary commented Nov 27, 2024

I had the same problem, it seems some of the recent commits to this project caused this problem, you must download the last stable version from releases (v0.2.0.0) if you want to work with this project.

@stroxler
Copy link
Contributor

cc @patapizza - I'm guessing you may be able to work out where the problem is most quickly

@hyunsooda
Copy link
Author

Thanks @abolfazlakbary, I installed with v0.2.0.0 again and build passed.

A new error is found when I execute a binary. Did you not encounter this kind of error?

❯ stack exec duckling-example-exe
duckling-example-exe: /etc/zoneinfo/: getDirectoryContents:openDirStream: does not exist (No such file or directory)

@abolfazlakbary
Copy link

Actually @hyunsooda , i had the same error . if your operating system is linux, you must edit a file in project_dir/exe/ExampleMain.hs. search for a function called loadTZs, and as you can see two variables are defined, defaultPath and fallbackPath. I solved the issue by giving both variables this value: "/usr/share/zoneinfo/".

@hyunsooda
Copy link
Author

@abolfazlakbary Thank you for your support. I used your guidance to make adjustments and recompiled the project. However, I encountered an OlsonData library error. It might be worth it for the team to verify and reorganize the build environment and executable setup.

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

3 participants