Code Monkey home page Code Monkey logo

Comments (8)

ccstevens avatar ccstevens commented on July 18, 2024

@seclorum I wasn't able to reproduce this .incbin issue. I'm running macOS 10.12.1 with the xcode 8.1 tools. My steps are below, starting from scratch without previous Minoca macOS toolchains in ~/minocaos/src/x86dbg:

  1. mkdir ~/minocaos
  2. Download http://www.minocacorp.com/download/minoca-tools-macos.tar.gz into ~/minocaos
  3. cd ~/minocaos
  4. tar -xzf minoca-tools-macos.tar.gz
  5. cd src
  6. git clone https://github.com/minoca/os.git
  7. export SRCROOT=~/minocaos/src
  8. export ARCH=x86
  9. export DEBUG=dbg
  10. export PATH=$PATH:$SRCROOT/$ARCH$DEBUG/tools/bin
  11. cd os
  12. make

We'd love to get a repro, so if you can confirm your xcode version and the steps you took to reach the error that'd be awesome!

from os.

evangreen avatar evangreen commented on July 18, 2024

Hi @seclorum . Chris and I have been tackling this. Just to clarify, can you make sure you've pulled my os changes from last night? You should have commit 5f5e26b in there.

If it's still not working, then can you remove the @ from what should now be line 519 of minoca.mk, and rebuild, so we can see the command line being run?

Also, so that we can repro it locally, can you tell us where you got the compiler from? Is it the one that comes with XCode or did you install it some other way? We've been using the compiler that seems to magically come with XCode.

from os.

seclorum avatar seclorum commented on July 18, 2024

Can confirm I am on your latest:

* e904499 2016-11-01 | Parallel build fix. (HEAD -> master, origin/master, origin/HEAD) [Evan Green]
* 5f5e26b 2016-11-01 | Fix fseeko64 build break on Apple. [Evan Green]

.. still produces this (@ from 519 is removed..)

Entering Directory: /Users/seclorum/Documents/minocaOS/src/os/apps/ck/lib/build
Assembling - ckcore.S
gcc  -I /Users/seclorum/Documents/minocaOS/src/os/apps/ck/lib/build/.. -I  /Users/seclorum/Documents/minocaOS/src/os/include -DDEBUG=1  -Wa,-I/Users/seclorum/Documents/minocaOS/src/os/apps/ck/lib/build -c -o ckcore.o /Users/seclorum/Documents/minocaOS/src/os/apps/ck/lib/build/../ckcore.S
/Users/seclorum/Documents/minocaOS/src/os/apps/ck/lib/build/../ckcore.S:55:70: error: Could not find incbin file 'ckcore.ck'
.global __binary_ckcore_ck_start; __binary_ckcore_ck_start:; .incbin "ckcore.ck"; .global __binary_ckcore_ck_end; __binary_ckcore_ck_end:
                                                                     ^
make[5]: *** [ckcore.o] Error 1
make[4]: *** [build] Error 2
make[3]: *** [lib] Error 2
make[2]: *** [ck] Error 2
make[1]: *** [apps] Error 2
make: *** [/Users/seclorum/Documents/minocaOS/src/x86dbg/obj/os] Error 2

Should ckcore.ck not be in the build/ directory, somewhere, since its a dependency?

EDIT: I've noticed that i685-pc-minoca-gcc is not being used .. ?

from os.

seclorum avatar seclorum commented on July 18, 2024
$ ../x86dbg/tools/bin/i686-pc-minoca-gcc  -I/Users/seclorum/Documents/minocaOS/src/os/apps/ck/lib/build/.. -I  /Users/seclorum/Documents/minocaOS/src/os/include -DDEBUG=1  -Wa,-I/Users/seclorum/Documents/minocaOS/src/os/apps/ck/lib/build -c -o ckcore.o /Users/seclorum/Documents/minocaOS/src/os/apps/ck/lib/build/../ckcore.S
$ ls -l ckcore.o
-rw-r--r--+ 1 seclorum  staff  9871 Nov  2 20:08 ckcore.o

Okay, this seems to be the problem: system gcc being used, versus the toolchain. Somehow, chalk is not set up to use the provided toolchain and is getting system gcc instead ..

So, I imagine that you Linux users are generating x86 .o's with your local compilers just fine, whereas in the Darwin case, gcc "out of the box" doesn't like those spaces in the -I ..

 seclorum@github:~/Documents/minocaOS/src/os {(master)}
$ ls -l `which gcc`
lrwxr-xr-x  1 seclorumj  admin  7 Jan 17  2015 /usr/local/bin/gcc -> gcc-4.9

 seclorum@github:~/Documents/minocaOS/src/os {(master)}
 $ ../x86dbg/tools/bin/i686-pc-minoca-gcc  --version
i686-pc-minoca-gcc (GCC) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 seclorum@github:~/Documents/minocaOS/src/os {(master)}
$ gcc --version
gcc (Homebrew gcc49 4.9.3) 4.9.3
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

from os.

evangreen avatar evangreen commented on July 18, 2024

Well ckcore.ck is really a source. Chalk builds for both the build machine and for Minoca. We're having trouble creating the build machine version (which is why it's using the system GCC).

The current directory when the file is compiled is going to be src/x86dbg/obj/os/apps/ck/lib/build . For some reason my version of the system GCC must be passing an include path to the assembler that includes the directory the source file is in, while your version seems unwilling to search there. Let's try adding that specific path directly.

Can you try adding this line to apps/ck/lib/build/Makefile, right before "include $(SRCROOT)/os/minoca.mk":

EXTRA_ASFLAGS += -Wa,-I$(SRCDIR)/..

from os.

evangreen avatar evangreen commented on July 18, 2024

Ah okay, Chris clued me in to the key output in your last message, which was Homebrew.

I was able to get Homebrew+GCC-6 installed on my macbook and reproduce the issue. The fix I posted above works, so I committed it as 053faaa. Grab the latest and you should be good here.

Sorry for all the build trouble. Now to see if it runs :)

from os.

aequitas avatar aequitas commented on July 18, 2024

@evangreen I pulled down the latests changes and it seems to solve the problem for ckcore.

However I run into a new issue: #29

from os.

seclorum avatar seclorum commented on July 18, 2024

ckcore issue is fixed for me, thanks for the work on the build issue guys, looking forward to digging in further ..

from os.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.