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
FS#4256 - CMake fails to build (gcc complains about missing -fPIE flag) #9236
Comments
Fixed with 0d25db7 . edit: never mind. This is not the same issue. |
From master branch (commit e1de25b) I still get this (it's the same error as above, but here it's properly formatted -- I do not have permission to edit the above, since the issue was opened by a bot):
(Never mind the directory name, |
Just ran |
The error seems to be in cmake's jsoncpp support. Maybe add --system-jsoncpp |
You mean changing
And although the option was used, the same error occurred.
|
Erm that's weird. I'll need to setup a container to see what's up. |
Good point - I'll try the same. |
Okay, I bootstrapped Debian stable and made a docker image out of it (I don't trust dockerhub). Inside the container, a checkout of OpenWRT, branch |
i had this error as well. I ended up having to move to a larger build resource (8GB ram i think) on my build environment (circleci) to resolve it. |
jpellegrini:
Hello!
I've been compiling OpenWRT from sources for several years (I maintain a bunch of unofficial packages), and recently tools/cmake won't build from sources anymore, complaining that objects should be recompiled with -fPIE
This is a fresh checkout of the git repository; I only selected the openwrt-21.02 branch then ran make menuconfig, chose "Archer C7 v4" and then ran make tools/install.
It also happens in the master branch.
This is GCC 11 on a Debian system.
g++ -L/home/jeronimo/pkg/openwrt/staging_dir/host/lib -O2 -I/home/jeronimo/pkg/openwrt/staging_dir/host/include -DCMAKE_BOOTSTRAP -DCMake_HAVE_CXX_MAKE_UNIQUE=1 -DCMake_HAVE_CXX_FILESYSTEM=1 -I/home/jeronimo/pkg/openwrt/build_dir/host/cmake-3.19.1/Bootstrap.cmk -I/home/jeronimo/pkg/openwrt/build_dir/host/cmake-3.19.1/Source -I/home/jeronimo/pkg/openwrt/build_dir/host/cmake-3.19.1/Source/LexerParser -I/home/jeronimo/pkg/openwrt/build_dir/host/cmake-3.19.1/Utilities/std -I/home/jeronimo/pkg/openwrt/build_dir/host/cmake-3.19.1/Utilities cmAddCustomCommandCommand.o cmAddCustomTargetCommand.o cmAddDefinitionsCommand.o cmAddDependenciesCommand.o cmAddExecutableCommand.o cmAddLibraryCommand.o cmAddSubDirectoryCommand.o cmAddTestCommand.o cmArgumentParser.o cmBinUtilsLinker.o cmBinUtilsLinuxELFGetRuntimeDependenciesTool.o cmBinUtilsLinuxELFLinker.o cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.o cmBinUtilsMacOSMachOGetRuntimeDependenciesTool.o cmBinUtilsMacOSMachOLinker.o cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.o cmBinUtilsWindowsPEGetRuntimeDependenciesTool.o cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.o cmBinUtilsWindowsPELinker.o cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.o cmBreakCommand.o cmBuildCommand.o cmCMakeMinimumRequired.o cmCMakePath.o cmCMakePolicyCommand.o cmCPackPropertiesGenerator.o cmCacheManager.o cmCheckCustomOutputs.o cmCommand.o cmCommandArgumentParserHelper.o cmCommands.o cmCommonTargetGenerator.o cmComputeComponentGraph.o cmComputeLinkDepends.o cmComputeLinkInformation.o cmComputeTargetDepends.o cmConsoleBuf.o cmConditionEvaluator.o cmConfigureFileCommand.o cmContinueCommand.o cmCoreTryCompile.o cmCreateTestSourceList.o cmCustomCommand.o cmCustomCommandGenerator.o cmCustomCommandLines.o cmDefinePropertyCommand.o cmDefinitions.o cmDocumentationFormatter.o cmEnableLanguageCommand.o cmEnableTestingCommand.o cmExecProgramCommand.o cmExecuteProcessCommand.o cmExpandedCommandArgument.o cmExportBuildFileGenerator.o cmExportFileGenerator.o cmExportInstallFileGenerator.o cmExportSet.o cmExportTryCompileFileGenerator.o cmExprParserHelper.o cmExternalMakefileProjectGenerator.o cmFileCommand.o cmFileCopier.o cmFileInstaller.o cmFileTime.o cmFileTimeCache.o cmFileTimes.o cmFindBase.o cmFindCommon.o cmFindFileCommand.o cmFindLibraryCommand.o cmFindPackageCommand.o cmFindPathCommand.o cmFindProgramCommand.o cmForEachCommand.o cmFunctionBlocker.o cmFunctionCommand.o cmFSPermissions.o cmGeneratedFileStream.o cmGeneratorExpression.o cmGeneratorExpressionContext.o cmGeneratorExpressionDAGChecker.o cmGeneratorExpressionEvaluationFile.o cmGeneratorExpressionEvaluator.o cmGeneratorExpressionLexer.o cmGeneratorExpressionNode.o cmGeneratorExpressionParser.o cmGeneratorTarget.o cmGetCMakePropertyCommand.o cmGetDirectoryPropertyCommand.o cmGetFilenameComponentCommand.o cmGetPipes.o cmGetPropertyCommand.o cmGetSourceFilePropertyCommand.o cmGetTargetPropertyCommand.o cmGetTestPropertyCommand.o cmGlobalCommonGenerator.o cmGlobalGenerator.o cmGlobVerificationManager.o cmHexFileConverter.o cmIfCommand.o cmIncludeCommand.o cmIncludeGuardCommand.o cmIncludeDirectoryCommand.o cmIncludeRegularExpressionCommand.o cmInstallCommand.o cmInstallCommandArguments.o cmInstallDirectoryGenerator.o cmInstallExportGenerator.o cmInstallFilesCommand.o cmInstallFilesGenerator.o cmInstallGenerator.o cmInstallScriptGenerator.o cmInstallSubdirectoryGenerator.o cmInstallTargetGenerator.o cmInstallTargetsCommand.o cmInstalledFile.o cmLDConfigLDConfigTool.o cmLDConfigTool.o cmLinkDirectoriesCommand.o cmLinkItem.o cmLinkItemGraphVisitor.o cmLinkLineComputer.o cmLinkLineDeviceComputer.o cmListCommand.o cmListFileCache.o cmLocalCommonGenerator.o cmLocalGenerator.o cmMSVC60LinkLineComputer.o cmMacroCommand.o cmMakeDirectoryCommand.o cmMakefile.o cmMarkAsAdvancedCommand.o cmMathCommand.o cmMessageCommand.o cmMessenger.o cmNewLineStyle.o cmOSXBundleGenerator.o cmOptionCommand.o cmOrderDirectories.o cmOutputConverter.o cmParseArgumentsCommand.o cmPathLabel.o cmPolicies.o cmProcessOutput.o cmProjectCommand.o cmPropertyDefinition.o cmPropertyMap.o cmReturnCommand.o cmRulePlaceholderExpander.o cmRuntimeDependencyArchive.o cmScriptGenerator.o cmSearchPath.o cmSeparateArgumentsCommand.o cmSetCommand.o cmSetDirectoryPropertiesCommand.o cmSetPropertyCommand.o cmSetSourceFilesPropertiesCommand.o cmSetTargetPropertiesCommand.o cmSetTestsPropertiesCommand.o cmSiteNameCommand.o cmSourceFile.o cmSourceFileLocation.o cmStandardLevelResolver.o cmState.o cmStateDirectory.o cmStateSnapshot.o cmString.o cmStringAlgorithms.o cmStringReplaceHelper.o cmStringCommand.o cmSubcommandTable.o cmSubdirCommand.o cmSystemTools.o cmTarget.o cmTargetCompileDefinitionsCommand.o cmTargetCompileFeaturesCommand.o cmTargetCompileOptionsCommand.o cmTargetIncludeDirectoriesCommand.o cmTargetLinkLibrariesCommand.o cmTargetLinkOptionsCommand.o cmTargetPrecompileHeadersCommand.o cmTargetPropCommandBase.o cmTargetPropertyComputer.o cmTargetSourcesCommand.o cmTest.o cmTestGenerator.o cmTimestamp.o cmTryCompileCommand.o cmTryRunCommand.o cmUnsetCommand.o cmUVHandlePtr.o cmUVProcessChain.o cmVersion.o cmWhileCommand.o cmWorkingDirectory.o cmake.o cmakemain.o cmcmd.o cmDepends.o cmDependsC.o cmGlobalUnixMakefileGenerator3.o cmLocalUnixMakefileGenerator3.o cmMakefileExecutableTargetGenerator.o cmMakefileLibraryTargetGenerator.o cmMakefileTargetGenerator.o cmMakefileUtilityTargetGenerator.o fs_path.o string_view.o cmCommandArgumentLexer.o cmCommandArgumentParser.o cmExprLexer.o cmExprParser.o cmListFileLexer.o Directory.o EncodingCXX.o FStream.o Glob.o RegularExpression.o SystemTools.o EncodingC.o ProcessUNIX.o String.o System.o Terminal.o uv-src-strscpy.c.o uv-src-timer.c.o uv-src-uv-common.c.o uv-src-unix-cmake-bootstrap.c.o uv-src-unix-core.c.o uv-src-unix-fs.c.o uv-src-unix-loop.c.o uv-src-unix-loop-watcher.c.o uv-src-unix-no-fsevents.c.o uv-src-unix-pipe.c.o uv-src-unix-poll.c.o uv-src-unix-posix-hrtime.c.o uv-src-unix-posix-poll.c.o uv-src-unix-process.c.o uv-src-unix-signal.c.o uv-src-unix-stream.c.o -ldl -lrt -o cmake /usr/bin/ld: cmListFileLexer.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: failed to set dynamic section sizes: bad value collect2: error: ld returned 1 exit status gmake[3]: *** [Makefile:2: cmake] Error 1 gmake[3]: Leaving directory '/home/jeronimo/pkg/openwrt/build_dir/host/cmake-3.19.1/Bootstrap.cmk' --------------------------------------------- Error when bootstrapping CMake: Problem while running gmake --------------------------------------------- Log of errors: /home/jeronimo/pkg/openwrt/build_dir/host/cmake-3.19.1/Bootstrap.cmk/cmake_bootstrap.log --------------------------------------------- make[2]: *** [Makefile:39: /home/jeronimo/pkg/openwrt/build_dir/host/cmake-3.19.1/.configured] Error 9 make[2]: Leaving directory '/home/jeronimo/pkg/openwrt/tools/cmake' time: tools/cmake/compile#387.90#29.18#418.78 ERROR: tools/cmake failed to build. make[1]: *** [tools/Makefile:159: tools/cmake/compile] Error 1 make[1]: Leaving directory '/home/jeronimo/pkg/openwrt' make: *** [/home/jeronimo/pkg/openwrt/include/toplevel.mk:230: tools/compile] Error 2
The text was updated successfully, but these errors were encountered: