Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Pass CPU information to codegenerator, to fix mingw_x86 opt. #2870

Merged
merged 2 commits into from
Apr 16, 2019
Merged

Conversation

olonho
Copy link
Contributor

@olonho olonho commented Apr 15, 2019

No description provided.

@msink
Copy link
Contributor

msink commented Apr 15, 2019

Why not -mcpu=i686 or -mcpu=pentiumpro ?
Mingw32 works on Pentium-III and upper.

@msink
Copy link
Contributor

msink commented Apr 15, 2019

> Task :tetris:linkMainDebugExecutableTetris FAILED
e: Invalid argument: -Lf:\msys64\mingw64/lib
i: Use -help for more information

FAILURE: Build failed with an exception.

@olonho
Copy link
Contributor Author

olonho commented Apr 15, 2019

Let's see how things will work with this one, 10 years old CPU shall be good enough.

@olonho
Copy link
Contributor Author

olonho commented Apr 15, 2019

@msink what do you mean by "Task :tetris:linkMainDebugExecutableTetris FAILED" message?

@msink
Copy link
Contributor

msink commented Apr 15, 2019

I did:

git fetch jb pull/2870/head:win32_opt
git checkout win32_opt
git merge tetris32
gradlew clean build bundle
cd samples\tetris
..\..\gradlew build

and get this:

> Task :tetris:cinteropSdlTetris
Warning: Option -copt is deprecated. Please use -compilerOpts.
Warning: Option -copt is deprecated. Please use -compilerOpts.

> Task :tetris:linkMainDebugExecutableTetris FAILED
e: Invalid argument: -Lc:/msys64/mingw32/lib
i: Use -help for more information

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':tetris:linkMainDebugExecutableTetris'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_111\bin\java.exe'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 55s
5 actionable tasks: 5 executed

@olonho
Copy link
Contributor Author

olonho commented Apr 15, 2019

Doesn't it happen without the patch?

@msink
Copy link
Contributor

msink commented Apr 15, 2019

Yes, current master is broken in same way.
Will try on 1.2.0-fixes.

@msink
Copy link
Contributor

msink commented Apr 15, 2019

Hm, v1.2.0-fixes is broken too:

> Task :tetris:compileKotlinTetris
e: Compilation failed: Could not find serialized descriptor for index: -5147048824968772568 kotlinx.cinterop,CStructVar,<init>

 * Source files: Config.kt, SDL_Visualizer.kt, Tetris.kt, main.kt
 * Compiler version info: Konan: 1.2-dev / Kotlin: 1.3.30
 * Output kind: LIBRARY

e: java.lang.IllegalStateException: Could not find serialized descriptor for index: -5147048824968772568 kotlinx.cinterop,CStructVar,<init>
	at org.jetbrains.kotlin.backend.konan.serialization.DescriptorReferenceDeserializer.deserializeDescriptorReference(DeserializeDescriptorReference.kt:125)
	at org.jetbrains.kotlin.backend.konan.serialization.KotlinIrLinker$IrDeserializerForModule.deserializeDescriptorReference(KotlinIrLinker.kt:194)
	at org.jetbrains.kotlin.backend.konan.serialization.KotlinIrLinker$IrDeserializerForModule.deserializeIrSymbolData(KotlinIrLinker.kt:166)
	at org.jetbrains.kotlin.backend.konan.serialization.KotlinIrLinker$IrDeserializerForModule.deserializeIrSymbol(KotlinIrLinker.kt:144)
	at org.jetbrains.kotlin.backend.konan.serialization.IrModuleDeserializer.deserializeDelegatingConstructorCall(IrModuleDeserializer.kt:288)
	at org.jetbrains.kotlin.backend.konan.serialization.IrModuleDeserializer.deserializeOperation(IrModuleDeserializer.kt:648)
	at org.jetbrains.kotlin.backend.konan.serialization.IrModuleDeserializer.deserializeExpression(IrModuleDeserializer.kt:700)
	at org.jetbrains.kotlin.backend.konan.serialization.IrModuleDeserializer.deserializeStatement(IrModuleDeserializer.kt:188)
	at org.jetbrains.kotlin.backend.konan.serialization.IrModuleDeserializer.deserializeBlockBody(IrModuleDeserializer.kt:144)
	at org.jetbrains.kotlin.backend.konan.serialization.IrModuleDeserializer.deserializeStatement(IrModuleDeserializer.kt:180)
	at org.jetbrains.kotlin.backend.konan.serialization.IrModuleDeserializer.deserializeIrFunctionBase(IrModuleDeserializer.kt:825)
	at org.jetbrains.kotlin.backend.konan.serialization.IrModuleDeserializer.deserializeIrConstructor(IrModuleDeserializer.kt:972)
	at org.jetbrains.kotlin.backend.konan.serialization.IrModuleDeserializer.deserializeDeclaration(IrModuleDeserializer.kt:1120)
	at org.jetbrains.kotlin.backend.konan.serialization.IrModuleDeserializer.deserializeIrClass(IrModuleDeserializer.kt:801)
	at org.jetbrains.kotlin.backend.konan.serialization.IrModuleDeserializer.deserializeDeclaration(IrModuleDeserializer.kt:1124)
	at org.jetbrains.kotlin.backend.konan.serialization.KotlinIrLinker.deserializeTopLevelDeclaration(KotlinIrLinker.kt:293)
	at org.jetbrains.kotlin.backend.konan.serialization.KotlinIrLinker.deserializeAllReachableTopLevels(KotlinIrLinker.kt:325)
	at org.jetbrains.kotlin.backend.konan.serialization.KotlinIrLinker.findDeserializedDeclarationForDescriptor(KotlinIrLinker.kt:355)
	at org.jetbrains.kotlin.backend.konan.serialization.KotlinIrLinker.findDeserializedDeclaration(KotlinIrLinker.kt:362)
	at org.jetbrains.kotlin.ir.util.DeclarationStubGenerator$generateClassStub$1.invoke(DeclarationStubGenerator.kt:198)
	at org.jetbrains.kotlin.ir.util.DeclarationStubGenerator$generateClassStub$1.invoke(DeclarationStubGenerator.kt:35)
	at org.jetbrains.kotlin.ir.util.SymbolTable.declareClass(SymbolTable.kt:554)
	at org.jetbrains.kotlin.ir.util.SymbolTable.declareClass$default(SymbolTable.kt:236)
	at org.jetbrains.kotlin.ir.util.DeclarationStubGenerator.generateClassStub$ir_tree(DeclarationStubGenerator.kt:195)
	at org.jetbrains.kotlin.ir.util.ExternalDependenciesGenerator$DependencyGenerationTask.run(ExternalDependenciesGenerator.kt:44)
	at org.jetbrains.kotlin.ir.util.ExternalDependenciesGenerator.generateUnboundSymbolsAsDependencies(ExternalDependenciesGenerator.kt:36)
	at org.jetbrains.kotlin.psi2ir.generators.ModuleGenerator.generateUnboundSymbolsAsDependencies(ModuleGenerator.kt:48)
	at org.jetbrains.kotlin.psi2ir.Psi2IrTranslator.generateModuleFragment(Psi2IrTranslator.kt:61)
	at org.jetbrains.kotlin.backend.konan.ToplevelPhasesKt$psiToIrPhase$1.invoke(ToplevelPhases.kt:98)
	at org.jetbrains.kotlin.backend.konan.ToplevelPhasesKt$psiToIrPhase$1.invoke(ToplevelPhases.kt)
	at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$namedOpUnitPhase$1.invoke(PhaseBuilders.kt:58)
	at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$namedOpUnitPhase$1.invoke(PhaseBuilders.kt:56)
	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper$runBody$1.invoke(CompilerPhase.kt:91)
	at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.downlevel(CompilerPhase.kt:18)
	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper.runBody(CompilerPhase.kt:90)
	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper.invoke(CompilerPhase.kt:73)
	at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$then$1.invoke(PhaseBuilders.kt:15)
	at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$then$1.invoke(PhaseBuilders.kt:14)
	at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$then$1.invoke(PhaseBuilders.kt:14)
	at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$then$1.invoke(PhaseBuilders.kt:14)
	at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$then$1.invoke(PhaseBuilders.kt:14)
	at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$then$1.invoke(PhaseBuilders.kt:14)
	at org.jetbrains.kotlin.backend.common.phaser.PhaseBuildersKt$then$1.invoke(PhaseBuilders.kt:14)
	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper$runBody$1.invoke(CompilerPhase.kt:91)
	at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.downlevel(CompilerPhase.kt:18)
	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper.runBody(CompilerPhase.kt:90)
	at org.jetbrains.kotlin.backend.common.phaser.AbstractNamedPhaseWrapper.invoke(CompilerPhase.kt:73)
	at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:33)
	at org.jetbrains.kotlin.backend.konan.KonanDriverKt.runTopLevelPhases(KonanDriver.kt:30)
	at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:78)
	at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:35)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:84)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:42)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:103)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:81)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:49)
	at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:214)
	at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMain(CLITool.kt:206)
	at org.jetbrains.kotlin.cli.bc.K2Native$Companion$main$1.invoke(K2Native.kt:217)
	at org.jetbrains.kotlin.cli.bc.K2Native$Companion$main$1.invoke(K2Native.kt:208)
	at org.jetbrains.kotlin.konan.util.UtilKt.profileIf(Util.kt:39)
	at org.jetbrains.kotlin.konan.util.UtilKt.profile(Util.kt:33)
	at org.jetbrains.kotlin.cli.bc.K2Native$Companion.main(K2Native.kt:210)
	at org.jetbrains.kotlin.cli.bc.K2NativeKt.main(K2Native.kt:296)
	at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:16)


> Task :tetris:compileKotlinTetris FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':tetris:compileKotlinTetris'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_111\bin\java.exe'' finished with non-zero exit value 2

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 12s
2 actionable tasks: 1 executed, 1 up-to-date

Sorry, did not delete samples/tetris/build

@msink
Copy link
Contributor

msink commented Apr 15, 2019

Well, on v1.2.0-fixes branch:

  • -mcpu=sandybridge - fixes tetris RELEASE build
  • -mcpu=i686 - does not fix.

@msink
Copy link
Contributor

msink commented Apr 15, 2019

Minimal working is -mcpu=pentium4.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants