From what I can tell, there should be no need download and compile the Basilisk program into RetroPie, it is already included in the version 3.4 you said you’re using.
Following the RetroPie wiki, I also found the performa.rom/MacStartup.img files, renamed them accordingly to disk.img/mac.rom, placed them in the proper folder, and the emulator boots up no problem.
The first problem I found is that the disk.img file only has a few MB free when its loaded in the emulator as your hard drive. I had to install Basilisk on my PC in order to have the settings GUI to create a new larger disk image and then copy the contents of the old image to it in order to have a hard drive large enough to do anything in the RetroPie Basilisk.
After all that, the couple of programs I’ve tried didn’t have any sound, and the mouse is so jumpy it’s not really worth using anyway.
I’ve read in other forums that people are having much better luck using MinivMac on the Raspberry Pi. It emulates an older version mac without color, but supposedly the compatibility is a little better. Might be something worth looking into adding to RetroPie.