Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'SConsEnvironment' object has no attribute 'has_key': #47

Open
iOSPrincekin opened this issue Jun 27, 2023 · 6 comments

Comments

@iOSPrincekin
Copy link

➜ openiBoot git:(master) ✗ scons iPodTouch1G
scons: Reading SConscript files ...
AttributeError: 'SConsEnvironment' object has no attribute 'has_key':
File "/Users/lee/Desktop/Computer_Systems/xnu/openiBoot/SConstruct", line 23:
env = ARMEnvironment()
File "/Users/lee/Desktop/Computer_Systems/xnu/openiBoot/scons/ARMEnvironment.SConscript", line 18:
if not env.has_key("CROSS"):

➜ openiBoot git:(master) ✗ brew info scons

==> scons: stable 4.5.2 (bottled)

@MLXProjects
Copy link

I would try using Makefiles instead

@iOSPrincekin
Copy link
Author

I would try using Makefiles instead

The Makefile uses the scons too, which show the same error! Do you success when using Makefile?

@nickpack
Copy link
Member

This was built against the current scons version 12 years ago, the API looks very different now so would need patching to work with modern versions.

@iOSPrincekin
Copy link
Author

This was built against the current scons version 12 years ago, the API looks very different now so would need patching to work with modern versions.

after trying,I can compile it using arm-elf-gcc-4.7 on macos 13.0, but can't link it:

➜ openiBoot git:(master) ✗ /usr/local/Cellar/[email protected]/3.9.13_1/Frameworks/Python.framework/Versions/3.9/bin/scons iPodTouch1G
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
arm-elf-ld -o ipt_1g_openiboot -mlittle-endian -mfpu=vfp -mthumb -mthumb-interwork -fPIC -Wno-error=unused-but-set-variable -fno-strict-aliasing -Wno-error=maybe-uninitialized -nostdlib -Ttext=0x0 arch-arm/iPodTouch1G_entry.o iPodTouch1G_init.o arch-arm/iPodTouch1G_asmhelpers.o arch-arm/iPodTouch1G_arm.o iPodTouch1G_device.o iPodTouch1G_mtd.o iPodTouch1G_bdev.o iPodTouch1G_nand.o iPodTouch1G_vfl.o iPodTouch1G_ftl.o iPodTouch1G_audiohw.o iPodTouch1G_actions.o iPodTouch1G_commands.o iPodTouch1G_framebuffer.o iPodTouch1G_images.o iPodTouch1G_malloc.o iPodTouch1G_nvram.o iPodTouch1G_openiboot.o iPodTouch1G_printf.o iPodTouch1G_scripting.o iPodTouch1G_sha1.o iPodTouch1G_stb_image.o iPodTouch1G_syscfg.o iPodTouch1G_tasks.o iPodTouch1G_util.o iPodTouch1G_aes_wrap.o plat-s5l8900/iPodTouch1G_s5l8900.o plat-s5l8900/iPodTouch1G_accel.o plat-s5l8900/iPodTouch1G_aes.o plat-s5l8900/iPodTouch1G_buttons.o plat-s5l8900/iPodTouch1G_chipid.o plat-s5l8900/iPodTouch1G_clock.o plat-s5l8900/iPodTouch1G_dma.o plat-s5l8900/iPodTouch1G_event.o plat-s5l8900/iPodTouch1G_gpio.o plat-s5l8900/iPodTouch1G_i2c.o plat-s5l8900/iPodTouch1G_interrupt.o plat-s5l8900/iPodTouch1G_lcd.o plat-s5l8900/iPodTouch1G_miu.o plat-s5l8900/iPodTouch1G_mmu.o plat-s5l8900/iPodTouch1G_nand.o plat-s5l8900/iPodTouch1G_ftl.o plat-s5l8900/iPodTouch1G_pmu.o plat-s5l8900/iPodTouch1G_power.o plat-s5l8900/iPodTouch1G_sdio.o plat-s5l8900/iPodTouch1G_spi.o plat-s5l8900/iPodTouch1G_timer.o plat-s5l8900/iPodTouch1G_uart.o plat-s5l8900/iPodTouch1G_usbphy.o plat-s5l8900/iPodTouch1G_wdt.o plat-s5l8900/iPodTouch1G_wlan.o hfs/iPodTouch1G_bdev.o hfs/iPodTouch1G_btree.o hfs/iPodTouch1G_catalog.o hfs/iPodTouch1G_extents.o hfs/iPodTouch1G_fastunicodecompare.o hfs/iPodTouch1G_fs.o hfs/iPodTouch1G_rawfile.o hfs/iPodTouch1G_utility.o hfs/iPodTouch1G_volume.o hfs/iPodTouch1G_xattr.o hfs/iPodTouch1G_hfscompress.o plat-s5l8900/iPodTouch1G_piezo.o plat-s5l8900/iPodTouch1G_wm8958.o plat-s5l8900/iPodTouch1G_multitouch-z2.o acm/iPodTouch1G_acm.o usb-synopsys/iPodTouch1G_usb.o nor-cfi/iPodTouch1G_nor.o menu/iPodTouch1G_menu.o iPodTouch1G_sentinel.o -lgcc
arm-elf-ld: unrecognised emulation mode: thumb-interwork
Supported emulations: armelf
scons: *** [ipt_1g_openiboot] Error 1
scons: building terminated because of errors.

can anyone help me,thanks a lot!

@iOSPrincekin
Copy link
Author

This was built against the current scons version 12 years ago, the API looks very different now so would need patching to work with modern versions.

so let us patch it, it would be a great thing!

@ricky26
Copy link
Member

ricky26 commented Jul 4, 2023

arm-elf-ld: unrecognised emulation mode: thumb-interwork
Supported emulations: armelf

I'm suspicious that this flag (-mthumb-interwork) shouldn't be being sent to the linker. Might need to check out where that's added and make sure it gets sent only to GCC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants