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

'stack build' fail on Ubuntu 19.10 #9

Open
daveman1010221 opened this issue Jan 9, 2020 · 4 comments
Open

'stack build' fail on Ubuntu 19.10 #9

daveman1010221 opened this issue Jan 9, 2020 · 4 comments

Comments

@daveman1010221
Copy link

Not sure what to do with the linker error, it looks like maybe it wants some ENV vars set?

Building all executables for hue-dashboard' once. After a successful build of all of them, only specified executables will be rebuilt.
hue-dashboard-0.1.0.0: configure (exe)
Configuring hue-dashboard-0.1.0.0...
hue-dashboard-0.1.0.0: build (exe)
Preprocessing executable 'hue-dashboard' for hue-dashboard-0.1.0.0...
Linking .stack-work/dist/x86_64-linux-tinfo6/Cabal-1.22.5.0/build/hue-dashboard/hue-dashboard ...
/usr/bin/ld: /home/me/.stack/snapshots/x86_64-linux-tinfo6/lts-5.15/7.10.3/lib/x86_64-linux-ghc-7.10.3/unix-compat-0.4.1.4-Km8uiabmElX5mrb8D4Fywe/libHSunix-compat-0.4.1.4-Km8uiabmElX5mrb8D4Fywe-ghc7.10.3.so: undefined reference to major' /usr/bin/ld: /home/me/.stack/snapshots/x86_64-linux-tinfo6/lts-5.15/7.10.3/lib/x86_64-linux-ghc-7.10.3/unix-compat-0.4.1.4-Km8uiabmElX5mrb8D4Fywe/libHSunix-compat-0.4.1.4-Km8uiabmElX5mrb8D4Fywe-ghc7.10.3.so: undefined reference to makedev'
/usr/bin/ld: /home/me/.stack/snapshots/x86_64-linux-tinfo6/lts-5.15/7.10.3/lib/x86_64-linux-ghc-7.10.3/unix-compat-0.4.1.4-Km8uiabmElX5mrb8D4Fywe/libHSunix-compat-0.4.1.4-Km8uiabmElX5mrb8D4Fywe-ghc7.10.3.so: undefined reference to `minor'
collect2: error: ld returned 1 exit status

-- While building custom Setup.hs for package hue-dashboard-0.1.0.0 using:
/home/me/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_1.22.5.0_ghc-7.10.3 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-1.22.5.0 build exe:hue-dashboard --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1`

@Noir-
Copy link

Noir- commented Mar 28, 2020

Same here for building on Arch Linux.

@TiZ-HugLife
Copy link

Same on Xubuntu 20.04.

@tyalie
Copy link

tyalie commented Jan 20, 2021

I've the same problem. :/

@mjeveritt
Copy link

Getting similar issues with Ubuntu 18 LTS. Newest stack installed. End of build log as follows:

Linking .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/hue-dashboard/hue-dashboard ...
/disk/shome/michael/.stack/snapshots/x86_64-linux/4c3c3aa75912a2adf36e0b2098c23f7fb96a6b38135113ca07828155e889166d/7.10.3/lib/x86_64-linux-ghc-7.10.3/unix-compat-0.4.1.4-Km8uiabmElX5mrb8D4Fywe/libHSunix-compat-0.4.1.4-Km8uiabmElX5mrb8D4Fywe-ghc7.10.3.so: undefined reference to `major'
/disk/shome/michael/.stack/snapshots/x86_64-linux/4c3c3aa75912a2adf36e0b2098c23f7fb96a6b38135113ca07828155e889166d/7.10.3/lib/x86_64-linux-ghc-7.10.3/unix-compat-0.4.1.4-Km8uiabmElX5mrb8D4Fywe/libHSunix-compat-0.4.1.4-Km8uiabmElX5mrb8D4Fywe-ghc7.10.3.so: undefined reference to `makedev'
/disk/shome/michael/.stack/snapshots/x86_64-linux/4c3c3aa75912a2adf36e0b2098c23f7fb96a6b38135113ca07828155e889166d/7.10.3/lib/x86_64-linux-ghc-7.10.3/unix-compat-0.4.1.4-Km8uiabmElX5mrb8D4Fywe/libHSunix-compat-0.4.1.4-Km8uiabmElX5mrb8D4Fywe-ghc7.10.3.so: undefined reference to `minor'
collect2: error: ld returned 1 exit status
                               
Warning: The following modules should be added to exposed-modules or other-modules in /home/kmichael/hue-dashboard/hue-dashboard.cabal:
             - In exe:hue-dashboard:
                 App
                 AppDefs
                 BackgroundProcessing
                 CmdLineOptions
                 HueBroker
                 HueJSON
                 HueREST
                 HueSetup
                 LightColor
                 PersistConfig
                 ProcFS
                 Trace
                 Util
                 WebUI
                 WebUIHelpers
                 WebUIREST
                 WebUITileBuilding
                 WebUITileBuildingScenes
                 WebUITileBuildingSchedules
         
         Missing modules in the cabal file are likely to cause undefined reference errors from the linker, along with other problems.
         ```

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

5 participants