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

C compiler cannot create executables #395

Closed
imesg opened this issue Aug 1, 2019 · 5 comments
Closed

C compiler cannot create executables #395

imesg opened this issue Aug 1, 2019 · 5 comments

Comments

@imesg
Copy link

imesg commented Aug 1, 2019

First six packages failed with this error.

Need help with this.

What info can I provide?

make.conf.lto and make.conf.lto.defines are largely unchanged.

Below are the changes I made to make.conf to get started. But immediately encountered the 'cannot create executables' problem.

Thanks
...
checking whether the C compiler works... no
configure: error: in `/var/tmp/portage/sys-apps/kbd-2.2.0-r1/work/kbd-2.2.0':
configure: error: C compiler cannot create executables

############################

LTO Overlay

source /etc/portage/make.conf.lto

CFLAGS="-march=native ${CFLAGS} -pipe" # -falign-functions=32" #NOTE: Consider using -falign-functions=32 if you use an Intel processor. See issue #164.
CXXFLAGS="${CFLAGS}"
FCFLAGS="${CFLAGS}"
FFLAGS="${CFLAGS}"
############################

###########################

Original

#COMMON_FLAGS="${CFLAGS} -march=native -O2 -pipe -falign-functions=32"
#CFLAGS="${COMMON_FLAGS}"
#CXXFLAGS="${COMMON_FLAGS}"
#FCFLAGS="${COMMON_FLAGS}"
#FFLAGS="${COMMON_FLAGS}"
###########################

MAKEOPTS="-j14"

USE="cups
graphite
gphoto2
ieee1394
lto
wayland
-multilib
-smartcard"

@jiblime
Copy link
Contributor

jiblime commented Aug 1, 2019

Here is the error:
CFLAGS="-march=native ${CFLAGS} -pipe" # -falign-functions=32" #NOTE: Consider using -falign-functions=32 if you use an Intel processor. See issue #164.

Too many quotes.

Fix:

NTHREADS="4" #REPLACE WITH NUMBER OF CORES
CFLAGS="-march=native ${CFLAGS} -pipe -falign-functions=32"
#CXXFLAGS="${CFLAGS}"
#FCFLAGS="${CFLAGS}"
#FFLAGS="${CFLAGS}"

MAKEOPTS=${NTHREADS}

USE="cups graphite gphoto2 ieee1394 lto wayland -multilib -smartcard"

How's your make.conf.lto and make.conf.lto.defines look? I was running flto= was the longest time because I didn't define $NTHREADS.

@imesg
Copy link
Author

imesg commented Aug 3, 2019

I still have the same problem as before.

Here are my make.conf* files.

Thanks for help.

make.conf:
HTHREADS="16"
source /etc/portage/make.conf.lto.defines

CFLAGS="-march=native ${CFLAGS} -pipe -falign-functions=32"
CXXFLAGS="${CFLAGS}"
#FCFLAGS="${CFLAGS}"
#FFLAGS="${CFLAGS}"
############################

###########################

Original

#COMMON_FLAGS="${CFLAGS} -march=native -O2 -pipe"
#CFLAGS="${COMMON_FLAGS}"
#CXXFLAGS="${COMMON_FLAGS}"
#FCFLAGS="${COMMON_FLAGS}"
#FFLAGS="${COMMON_FLAGS}"
###########################

MAKEOPTS="-j${NTHREADS}"
#MAKEOPTS="-j16"

USE="cups
gphoto2 \

graphite \

 ieee1394 \

lto \

 wayland \
 -multilib \
 -smartcard"

...

make.conf.lto:

NTHREADS="16"
MAKEOPTS="-j${NTHREADS}"
source make.conf.lto.defines
CFLAGS="-O3 ${GRAPHITE} ${DEVIRTLTO} ${IPAPTA} ${SEMINTERPOS} ${FLTO} -fuse-linker-plugin"

make.confi.lto.defines:

FLTO="-flto=${NTHREADS}"

GRAPHITE="-fgraphite-identity -floop-nest-optimize"

IPAPTA="-fipa-pta"

SEMINTERPOS="-fno-semantic-interposition"

NOCOMMON="-fno-common"

SAFEST_FAST_MATH="-fno-math-errno -fno-trapping-math"
SAFER_UNSAFE_MATH_OPTS="-fno-signed-zeros -fno-trapping-math -fassociative-math -freciprocal-math"
SAFER_FAST_MATH="${SAFER_UNSAFE_MATH_OPTS} -fno-math-errno -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fcx-limited-range -fexcess-precision=fast"

DEVIRTLTO="-fdevirtualize-at-ltrans"

NOPLT="-fno-plt"

@jiblime
Copy link
Contributor

jiblime commented Aug 4, 2019

Are you making new lines for each USE flag? I believe that doesn't work. If you want it to be easier to read, you can do something like:

KDEUSE="qt5 kde systray"
OPTIMIZATIONSUSE="pgo lto"

USE="${KDEUSE} ${OPTIMIZATIONSUSE}"

@imesg
Copy link
Author

imesg commented Aug 5, 2019

Been doing it for years. Seems to work ok. Easier to read that way. Cut and paste doesn't show the back slashes for some reason. There is a back slash after every line allowing continuation on the next line.

I continue to have the 'cannot create executable' problem.

@imesg
Copy link
Author

imesg commented Aug 5, 2019

Seems a reboot was all that was needed.

@imesg imesg closed this as completed Aug 5, 2019
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