nac3artiq.CompileError: Linking globals named '..._const': symbol multiply defined! #498

Closed
opened 2024-08-19 11:01:51 +08:00 by lyken · 0 comments
Collaborator

On ARTIQ 5ffa6e05224f7f4d748c1440de407a268fc8b49e with NAC3 69320a6cf1445e8fde28537823a26a361f4eb938.

artiq_compile this:

from artiq.coredevice.core import Core
from artiq.experiment import *

@nac3
class Hello(EnvExperiment):
    core: KernelInvariant[Core]

    def build(self):
        self.setattr_device("core")

    @rpc
    def print_str(self):
        print("---------")

    @rpc
    def bar(self):
        pass

    @kernel
    def run(self):
        self.foo() # Note [1]
        self.print_str() # Note [2]

    @kernel
    def foo(self):
        self.bar()

outputs:

nac3artiq.CompileError: Linking globals named '140735443430208_const': symbol multiply defined!

If you comment out either line Note [1] or Note [2] then there will be no error.

This is likely not a minimal example.

On ARTIQ `5ffa6e05224f7f4d748c1440de407a268fc8b49e` with NAC3 `69320a6cf1445e8fde28537823a26a361f4eb938`. `artiq_compile` this: ```python from artiq.coredevice.core import Core from artiq.experiment import * @nac3 class Hello(EnvExperiment): core: KernelInvariant[Core] def build(self): self.setattr_device("core") @rpc def print_str(self): print("---------") @rpc def bar(self): pass @kernel def run(self): self.foo() # Note [1] self.print_str() # Note [2] @kernel def foo(self): self.bar() ``` outputs: ``` nac3artiq.CompileError: Linking globals named '140735443430208_const': symbol multiply defined! ``` If you comment out either line `Note [1]` or `Note [2]` then there will be no error. This is likely not a minimal example.
derppening self-assigned this 2024-08-19 13:03:18 +08:00
sb10q closed this issue 2024-08-19 14:41:43 +08:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#498
No description provided.