Coding: Why can't I run this command inside Makefile, but I can run it from outside?

Discussion in '3DS - Homebrew Development and Emulators' started by delete12345, Jun 13, 2016.

  1. delete12345
    OP

    delete12345 GBAtemp Fan

    Member
    433
    179
    Feb 27, 2010
    United States
    Taipei, Taiwan
    [​IMG]

    To explain the first yellow box (from the top, the first one, after linking application.elf, and building the necessary files), I am running a makerom command to build a CIA file immediately after the ELF file is created. This is done from within the Makefile.

    But, as you can see, it errors out. Here's where it gets weird.

    For the second yellow box, I literally copied the exact output echoed from the Makefile from the first yellow box, and ran the command. It successfully created the CIA file, and did not report any errors.

    ---------------

    I really wanted to know why it happens. I can make CIA files just fine, but I see a lot more benefits if I can simplify the whole process down into a single "make" command.

    How is this possible? Why can't I run the command from the Makefile, and must run it outside of Makefile in order to get the CIA? Is there something that I am missing?

    Thank you. Hoping to see some answers to this issue.
     
  2. ihaveamac

    ihaveamac GBAtemp Guru

    Member
    5,491
    6,068
    Apr 20, 2015
    United States
    Tigard, OR
    'Invalid FileSystemAccess Name: "SeedDB"'

    this was added to makerom recently, is there a chance you're using buildtools or whatever? it probably has an outdated makerom.
     
  3. delete12345
    OP

    delete12345 GBAtemp Fan

    Member
    433
    179
    Feb 27, 2010
    United States
    Taipei, Taiwan
    The weird thing is it compiles successfully after I did the second command (second yellow box in the image).

    I already have the latest makerom.
     
  4. ihaveamac

    ihaveamac GBAtemp Guru

    Member
    5,491
    6,068
    Apr 20, 2015
    United States
    Tigard, OR
    I know, but the Makefile could be using a different makerom than the one in your PATH or whatever. I don't know but it's possible.
     
  5. delete12345
    OP

    delete12345 GBAtemp Fan

    Member
    433
    179
    Feb 27, 2010
    United States
    Taipei, Taiwan
    I only have 1 makerom.exe, placed in the msys /bin/ folder. I did not change any paths.
     
  6. ihaveamac

    ihaveamac GBAtemp Guru

    Member
    5,491
    6,068
    Apr 20, 2015
    United States
    Tigard, OR
    try adding -help to the makerom command in the Makefile, and use "makerom -help" so you can get their build dates?
     
    delete12345 likes this.
  7. delete12345
    OP

    delete12345 GBAtemp Fan

    Member
    433
    179
    Feb 27, 2010
    United States
    Taipei, Taiwan
    @ihaveamac You solved it!!

    Apparently, I didn't realized there's another makerom hidden within the devkitPro installation folder. Typing "makerom -help" revealed two different build dates, thus hinting me of this possibility.

    Thank you!
     
  8. justinkb

    justinkb GBAtemp Advanced Fan

    Member
    619
    210
    Oct 7, 2012
    Netherlands
    For future reference, you could have done the command "find / -type f -name 'makerom' -executable" to search your files for other makerom executables.