Saturday, September 30, 2017

gcc error in Ubuntu 18.04

I try to compile hello.c using gcc with -mnop-mcount option. But error occurs like below:




$ gcc -pg -mfentry -mnop-mcount -o hello hello.c
cc1: error: -mnop-mcount is not implemented for -fPIC


My gcc version is 7.3.0:



$ gcc --version
gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


And my Ubuntu version is 18.04 LTS:



$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04

Codename: bionic

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...