pret / pokeemerald

Decompilation of Pokémon Emerald

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error at makefile in payload folder: extra characters after command at ld_script.sed

4ofSpades opened this issue · comments

I've followed the steps described in the installation guide for pokeemerald, but it returns the following error when creating the ld_script.ld file in berry_fix/payload/build:
sed: file ../../ld_script.sed line 3: extra characters after command
Makefile:187: recipe for target 'build/ld_script.ld' failed

The error seems to occur in the makefile in the payload folder.

I am using Windows 10 with WSL version 1 (Ubuntu dist 18.04 LTS), and I made use of the build-essential package (based on the installation guide for pokeruby) to install gcc and g++, which are currently both on version 7.5.0.

If you want to hop on the discord and join #gen-3-help, we could identify what the problem is more quickly, but at a glance, I would guess that the problem is Windows vs. Linux line endings.

I'm going to ask a silly question just to get it out of the way.
How did you obtain the project? Did you download it as a .zip folder (Code>Download ZIP in the main page of the repository), or did you use git clone, @4ofSpades?

@LOuroboros I used git clone

As for the comment of @Kurausukun, I'm planning on joining the discord somewhere later this week to get the problem identified if I cannot manage to solve it by then.

As @Kurausukun mentioned, it was indeed caused by the Windows vs. Linux line endings. I solved it by opening ld_script.sed in both the berry_fix and the berry_fix/payload folder in notepad++ and converting the line endings by going to edit>EOL conversion and selecting unix (LF). These seemed to be the only files with different line endings, and I managed to build the rom file after adjusting these.

This should have not been closed; these files need to be in .gitattributes. Making a PR to fix this.