Assembler problem

Hi,

guys I need some help with this code

model {
  toolChains {
    gcc(Gcc) {
        assembler.executable = 'nasm'
        assembler.withArguments { args ->
          args.remove "-x"
          args.remove "-c"
          args.remove "assembler"
        }
      }
  components {
    SomeLibrary(NativeLibrarySpec) {
      sources {
        someAssemblerSource(AssemblerSourceSet) {
          targetPlatform "linux32"
          targetPlatform "linux64"
          source {
            srcDir "${project.rootDir}/somedirectory"
            include "somefile.asm"
          }
        }
      }

      binaries.all {
        assembler.args "-f", "elf64"
      }
}

This code works fine on gradle-2.4-20150202230023+0000 snapshot build, however when I try using the gradle-2.4-20150408220020+0000 I get this error

Parallel execution is an incubating feature. :Projects/Gradle/x86Assembly:assembleLinux64ReleaseSomeFileSource nasm: fatal: unrecognised output format `' - use -hf for a list type `nasm -h' for help

:Projects/Gradle/x86Assembly:assembleLinux64ReleaseSomeFileSource FAILED
:Projects/Gradle/x86Assembly:assembleLinux64ReleaseSomeFileSource took 6ms

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:Projects/Gradle/x86Assembly:assembleLinux64ReleaseSomeFileSource’.

A build operation failed.
Assembler failed while compiling somefile.asm; see the error output for details (log file: file:///home/ailic/workspace/gradleBuildDev/artifacts/tmp/assembleLinux64ReleaseSomeFileSource/output.txt).

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

I looked at the docs but I am not seeing anything that in the samples that would indicate that something changed, but I have been wrong before :smile:

Regards,
Ante

Could you post/send me your options.txt for the failed task?

OK, I broke it. We’re using command files and GCC/nasm take different options (@file vs -@file). It’s going to require a code change, I’ll post back here once it’s in.

There will be new nightlies for the release branch with a fix for this here: https://services.gradle.org/distributions-snapshots

It’ll take a day for a new build to show up.

Thanks for the quick intervention! I will take a look at the build and let you know if it was fixed as soon as the build is out.

I can verify that your fix worked. Thanks Sterling!