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

gcc: error: unrecognized command line option ‘-no-pie’ #159

Open
zedongh opened this issue May 14, 2018 · 3 comments
Open

gcc: error: unrecognized command line option ‘-no-pie’ #159

zedongh opened this issue May 14, 2018 · 3 comments

Comments

@zedongh
Copy link

zedongh commented May 14, 2018

No description provided.

@zedongh
Copy link
Author

zedongh commented May 14, 2018

//cabal install
gcc: error: unrecognized command line option ‘-no-pie’
gcc' failed in phase C Compiler'. (Exit code: 1)

// gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.5-4ubuntu8' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.5 (Ubuntu 4.8.5-4ubuntu8)

@ivan-m
Copy link
Collaborator

ivan-m commented May 14, 2018

I've been noticing something similar recently when building stuff on macOS and thought it was due to the fact that gcc is actually a wrapper around clang. Looks like that's wrong then...

Are you able to build other Haskell projects? What version of GHC and cabal-install are you using?

@zedongh
Copy link
Author

zedongh commented May 22, 2018

// cabal -V
cabal-install version 2.2.0.0
compiled using version 2.2.0.1 of the Cabal library

//ghci
GHCi, version 8.4.1: http://www.haskell.org/ghc/ :? for help

error in caball install
gcc: error: unrecognized command line option ‘-no-pie’
gcc' failed in phase C Compiler'. (Exit code: 1)

SO, i switch ghc version to 8.0.2

// cabal install
// final error
Failed to install haskell-src-exts-1.20.2
Build log ...
cabal: Entering directory '/tmp/cabal-tmp-13111/haskell-src-exts-1.20.2'
Configuring haskell-src-exts-1.20.2...
cabal: The program 'happy' version >=1.19 is required but it could not be
found.

cabal: Leaving directory '/tmp/cabal-tmp-13111/haskell-src-exts-1.20.2'
cabal: Error: some packages failed to install:
haskell-src-exts-1.20.2-2E29rOM6Ypo9cOLRfPAvi1 failed during the configure
step. The exception was:
ExitFailure 1
structured-haskell-mode-1.1.1-KIs3sKqhACvFhlhHL8jJ5u depends on
structured-haskell-mode-1.1.1 which failed to install.

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