Giter Site home page Giter Site logo

Comments (17)

joshuawarner32 avatar joshuawarner32 commented on May 19, 2024

@hydra1983, it looks like you don't have the standard headers properly installed (or, perhaps installed in a strange location). Can you look around your filesystem for stdlib.h?

from avian.

hydra1983 avatar hydra1983 commented on May 19, 2024

After a fresh installation of cygwin on another machine with the same os, I still got this:

edison@edison-PC ~
$ cd /local/src/avian/

edison@edison-PC /local/src/avian
$ make
compiling build/windows-i386/tools/type-generator/main-build.o
cygwin warning:
  MS-DOS style path detected: C:\Program Files\Java\jdk1.6.0_45/include
  Preferred POSIX equivalent is: /cygdrive/c/Program Files/Java/jdk1.6.0_45/incl                                                                                                 ude
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
src/tools/type-generator/main.cpp:11:20: fatal error: stdlib.h: No such file or                                                                                                  directory
compilation terminated.
makefile:1717: recipe for target `build/windows-i386/tools/type-generator/main-b                                                                                                 uild.o' failed
make: *** [build/windows-i386/tools/type-generator/main-build.o] Error 1

edison@edison-PC /local/src/avian
$ export JAVA_HOME="/cygdrive/c/Program Files/Java/jdk1.6.0_45"

edison@edison-PC /local/src/avian
$ make
compiling build/windows-i386/tools/type-generator/main-build.o
src/tools/type-generator/main.cpp:11:20: fatal error: stdlib.h: No such file or                                                                                                  directory
compilation terminated.
makefile:1717: recipe for target `build/windows-i386/tools/type-generator/main-b                                                                                                 uild.o' failed
make: *** [build/windows-i386/tools/type-generator/main-build.o] Error 1

Here are the locations of my "stdlib.h" file
image

from avian.

joshuawarner32 avatar joshuawarner32 commented on May 19, 2024

A quick test of avian on my cygwin install worked fine, and I don't see anything obviously wrong with the location(s) of stdlib.h (the /usr/include/stdlib.h should be the one).

Are you able to compile other software on cygwin?

You might try editing the makefile and adding a "-v" flag to common-cflags - that should give us a little more idea of what's going wrong. Also, build with "make MAKEFLAGS=" to print the exact commands that make is executing.

from avian.

hydra1983 avatar hydra1983 commented on May 19, 2024
Edison@admin-PC /local/src/avian
$ make MAKEFLAGS=
compiling build/windows-i386/tools/type-generator/main-build.o
i686-w64-mingw32-g++ -DPOINTER_SIZE=4 -O0 -g3 -Wall -Wextra -Werror -Wunused-parameter -Winit-self  -Wno-non-virtual-dtor -v -fno-rtti -fno-exceptions -Iclasspath  "-I/cygdrive/c/Program Files/Java/jdk1.6.0_45/include" -Isrc -Ibuild/windows-i386 -Iinclude   -D__STDC_LIMIT_MACROS -D_JNI_IMPLEMENTATION_ -DAVIAN_VERSION=\"0.7\"  -DAVIAN_INFO="\"\""  -DUSE_ATOMIC_OPERATIONS -DAVIAN_JAVA_HOME=\"\"  -DAVIAN_EMBED_PREFIX=\"c:/avian-embedded\" -DTARGET_BYTES_PER_WORD=4 "-I/cygdrive/c/Program Files/Java/jdk1.6.0_45/include/win32" -Isrc -I"/local/src/win32/include" -mthreads  -c src/tools/type-generator/main.cpp -o build/windows-i386/tools/type-generator/main-build.o
Using built-in specs.
COLLECT_GCC=i686-w64-mingw32-g++
Target: i686-w64-mingw32
Configured with: /cygdrive/i/szsz/tmpp/32gcc/mingw64-i686-gcc-4.7.3-1/src/gcc-4.7.3/configure --srcdir=/cygdrive/i/szsz/tmpp/32gcc/mingw64-i686-gcc-4.7.3-1/src/gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/mingw64-i686-gcc -C --build=i686-pc-cygwin --host=i686-pc-cygwin --target=i686-w64-mingw32 --without-libiconv-prefix --without-libintl-prefix --with-sysroot=/usr/i686-w64-mingw32/sys-root --with-build-sysroot=/usr/i686-w64-mingw32/sys-root --disable-multilib --disable-win32-registry --enable-languages=c,ada,c++,fortran,objc,obj-c++ --enable-fully-dynamic-string --enable-libgomp --enable-sjlj-exceptions --enable-version-specific-runtime-libs --with-dwarf2 --enable-decimal-float=bid --enable-lto
Thread model: win32
gcc version 4.7.3 (GCC)
COLLECT_GCC_OPTIONS='-D' 'POINTER_SIZE=4' '-O0' '-g3' '-Wall' '-Wextra' '-Werror' '-Wunused-parameter' '-Winit-self' '-Wno-non-virtual-dtor' '-v' '-fno-rtti' '-fno-exceptions' '-I' 'classpath' '-I' '/cygdrive/c/Program Files/Java/jdk1.6.0_45/include' '-I' 'src' '-I' 'build/windows-i386' '-I' 'include' '-D' '__STDC_LIMIT_MACROS' '-D' '_JNI_IMPLEMENTATION_' '-D' 'AVIAN_VERSION="0.7"' '-D' 'AVIAN_INFO=""' '-D' 'USE_ATOMIC_OPERATIONS' '-D' 'AVIAN_JAVA_HOME=""' '-D' 'AVIAN_EMBED_PREFIX="c:/avian-embedded"' '-D' 'TARGET_BYTES_PER_WORD=4' '-I' '/cygdrive/c/Program Files/Java/jdk1.6.0_45/include/win32' '-I' 'src' '-I' '/local/src/win32/include' '-mthreads' '-c' '-o' 'build/windows-i386/tools/type-generator/main-build.o' '-shared-libgcc' '-mtune=generic' '-march=pentiumpro'
 /usr/lib/gcc/i686-w64-mingw32/4.7.3/cc1plus.exe -quiet -v -I classpath -I /cygdrive/c/Program Files/Java/jdk1.6.0_45/include -I src -I build/windows-i386 -I include -I /cygdrive/c/Program Files/Java/jdk1.6.0_45/include/win32 -I src -I /local/src/win32/include -dD -D_MT -U_REENTRANT -D POINTER_SIZE=4 -D __STDC_LIMIT_MACROS -D _JNI_IMPLEMENTATION_ -D AVIAN_VERSION="0.7" -D AVIAN_INFO="" -D USE_ATOMIC_OPERATIONS -D AVIAN_JAVA_HOME="" -D AVIAN_EMBED_PREFIX="c:/avian-embedded" -D TARGET_BYTES_PER_WORD=4 src/tools/type-generator/main.cpp -quiet -dumpbase main.cpp -mthreads -mtune=generic -march=pentiumpro -auxbase-strip build/windows-i386/tools/type-generator/main-build.o -g3 -O0 -Wall -Wextra -Werror -Wunused-parameter -Winit-self -Wno-non-virtual-dtor -version -fno-rtti -fno-exceptions -o /tmp/ccc4ZKdn.s
GNU C++ (GCC) version 4.7.3 (i686-w64-mingw32)
        compiled by GNU C version 4.7.3, GMP version 5.1.1, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/i686-w64-mingw32/sys-root/usr/local/include"
ignoring nonexistent directory "/usr/lib/gcc/i686-w64-mingw32/4.7.3/../../../../i686-w64-mingw32/include"
ignoring duplicate directory "src"
#include "..." search starts here:
#include <...> search starts here:
 classpath
 /cygdrive/c/Program Files/Java/jdk1.6.0_45/include
 src
 build/windows-i386
 include
 /cygdrive/c/Program Files/Java/jdk1.6.0_45/include/win32
 /local/src/win32/include
 /usr/lib/gcc/i686-w64-mingw32/4.7.3/include/c++
 /usr/lib/gcc/i686-w64-mingw32/4.7.3/include/c++/i686-w64-mingw32
 /usr/lib/gcc/i686-w64-mingw32/4.7.3/include/c++/backward
 /usr/lib/gcc/i686-w64-mingw32/4.7.3/include
 /usr/lib/gcc/i686-w64-mingw32/4.7.3/include-fixed
 /usr/i686-w64-mingw32/sys-root/mingw/include
End of search list.
GNU C++ (GCC) version 4.7.3 (i686-w64-mingw32)
        compiled by GNU C version 4.7.3, GMP version 5.1.1, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 96b99eb8f7c340d2acdb3e1e802d58cd
src/tools/type-generator/main.cpp:11:20: fatal error: stdlib.h: No such file or directory
compilation terminated.
makefile:1717: recipe for target `build/windows-i386/tools/type-generator/main-build.o' failed
make: *** [build/windows-i386/tools/type-generator/main-build.o] Error 1

Edison@admin-PC /local/src/avian
$ find / -name "stdlib.h"
/lib/gcc/i686-pc-mingw32/4.7.3/include/c++/tr1/stdlib.h
/lib/gcc/i686-w64-mingw32/4.7.3/include/c++/tr1/stdlib.h
/lib/gcc/x86_64-w64-mingw32/4.7.3/include/c++/tr1/stdlib.h
/usr/i686-pc-mingw32/sys-root/mingw/include/stdlib.h
/usr/include/cygwin/stdlib.h
/usr/include/machine/stdlib.h
/usr/include/stdlib.h
/usr/lib/gcc/i686-pc-mingw32/4.7.3/include/c++/tr1/stdlib.h
/usr/lib/gcc/i686-w64-mingw32/4.7.3/include/c++/tr1/stdlib.h
/usr/lib/gcc/x86_64-w64-mingw32/4.7.3/include/c++/tr1/stdlib.h

from avian.

hydra1983 avatar hydra1983 commented on May 19, 2024

I tried to compile this:

#include "stdio.h"
#include "stdlib.h"

int main (int argc, char *argv[])
{
    printf ("Hello .... ");
}

It fails as well:

Edison@admin-PC /local/src/test
$ i686-w64-mingw32-g++ -v test.cc
Using built-in specs.
COLLECT_GCC=i686-w64-mingw32-g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-w64-mingw32/4.7.3/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: /cygdrive/i/szsz/tmpp/32gcc/mingw64-i686-gcc-4.7.3-1/src/gcc-4.                                                                                                                                                                                               7.3/configure --srcdir=/cygdrive/i/szsz/tmpp/32gcc/mingw64-i686-gcc-4.7.3-1/src/                                                                                                                                                                                               gcc-4.7.3 --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin                                                                                                                                                                                                --libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/e                                                                                                                                                                                               tc --datarootdir=/usr/share --docdir=/usr/share/doc/mingw64-i686-gcc -C --build=                                                                                                                                                                                               i686-pc-cygwin --host=i686-pc-cygwin --target=i686-w64-mingw32 --without-libicon                                                                                                                                                                                               v-prefix --without-libintl-prefix --with-sysroot=/usr/i686-w64-mingw32/sys-root                                                                                                                                                                                                --with-build-sysroot=/usr/i686-w64-mingw32/sys-root --disable-multilib --disable                                                                                                                                                                                               -win32-registry --enable-languages=c,ada,c++,fortran,objc,obj-c++ --enable-fully                                                                                                                                                                                               -dynamic-string --enable-libgomp --enable-sjlj-exceptions --enable-version-speci                                                                                                                                                                                               fic-runtime-libs --with-dwarf2 --enable-decimal-float=bid --enable-lto
Thread model: win32
gcc version 4.7.3 (GCC)
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=pentiumpro'
 /usr/lib/gcc/i686-w64-mingw32/4.7.3/cc1plus.exe -quiet -v -U_REENTRANT test.cc                                                                                                                                                                                                -quiet -dumpbase test.cc -mtune=generic -march=pentiumpro -auxbase test -version                                                                                                                                                                                                -o /tmp/ccG52vRt.s
GNU C++ (GCC) version 4.7.3 (i686-w64-mingw32)
        compiled by GNU C version 4.7.3, GMP version 5.1.1, MPFR version 3.1.2,                                                                                                                                                                                                MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/i686-w64-mingw32/sys-root/usr/local/include                                                                                                                                                                                               "
ignoring nonexistent directory "/usr/lib/gcc/i686-w64-mingw32/4.7.3/../../../../                                                                                                                                                                                               i686-w64-mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/i686-w64-mingw32/4.7.3/include/c++
 /usr/lib/gcc/i686-w64-mingw32/4.7.3/include/c++/i686-w64-mingw32
 /usr/lib/gcc/i686-w64-mingw32/4.7.3/include/c++/backward
 /usr/lib/gcc/i686-w64-mingw32/4.7.3/include
 /usr/lib/gcc/i686-w64-mingw32/4.7.3/include-fixed
 /usr/i686-w64-mingw32/sys-root/mingw/include
End of search list.
GNU C++ (GCC) version 4.7.3 (i686-w64-mingw32)
        compiled by GNU C version 4.7.3, GMP version 5.1.1, MPFR version 3.1.2,                                                                                                                                                                                                MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 96b99eb8f7c340d2acdb3e1e802d58cd
test.cc:1:19: fatal error: stdio.h: No such file or directory
compilation terminated.

from avian.

joshuawarner32 avatar joshuawarner32 commented on May 19, 2024

I have no idea how your environment would have gotten in that state, but it looks like gcc is looking for headers in different (but eerily similar) locations than they're actually installed in. A quick fix would likely be hacking the makefile to explicitly add one of the real header install locations to the header include path (-I/path). I wouldn't be surprised if you would have to do something similar for the linking step.

Some quick googling turned up this, which might be relevant: http://cboard.cprogramming.com/c-programming/139429-gcc-compiler-not-finding-header-files.html

from avian.

joshuawarner32 avatar joshuawarner32 commented on May 19, 2024

I don't have access to my windows VM at the moment, but 1.7 sounds familiar. I installed it about six months ago or so, and it was the latest version at the time. I should be able to tell you more specifics on Monday.

from avian.

hydra1983 avatar hydra1983 commented on May 19, 2024

OK, Thank you very much.

from avian.

joshuawarner32 avatar joshuawarner32 commented on May 19, 2024

I was running 1.7.x, and more significantly, gcc 4.5.3. When I upgraded to cygwin 1.7.22 and gcc 4.7.3 (just re-running setup.exe), the build failed for unrelated reasons - but once I got past those, it worked fine.

For reference, here's the include path my gcc is using:

/home/jwarner/win32/include
classpath
/cygdrive/c/Program Files/Java/jdk1.7.0_25//include
src
build/windows-i386
include
/cygdrive/c/Program Files/Java/jdk1.7.0_25//include/win32
/usr/lib/gcc/i686-w64-mingw32/4.7.3/include/c++
/usr/lib/gcc/i686-w64-mingw32/4.7.3/include/c++/i686-w64-mingw32
/usr/lib/gcc/i686-w64-mingw32/4.7.3/include/c++/backward
/usr/lib/gcc/i686-w64-mingw32/4.7.3/include
/usr/lib/gcc/i686-w64-mingw32/4.7.3/include-fixed
/usr/i686-w64-mingw32/sys-root/mingw/include

from avian.

hydra1983 avatar hydra1983 commented on May 19, 2024

I have no "/home/{user}/win32" directory installed. Maybe that's the
problem. I will try to fix it and compile again.
Thank you very much.

On 22 July 2013 23:36, Joshua Warner [email protected] wrote:

I was running 1.7.x, and more significantly, gcc 4.5.3. When I upgraded to
cygwin 1.7.22 and gcc 4.7.3 (just re-running setup.exe), the build failed
for unrelated reasons - but once I got past those, it worked fine.

For reference, here's the include path my gcc is using:

/home/jwarner/win32/include
classpath
/cygdrive/c/Program Files/Java/jdk1.7.0_25//include
src
build/windows-i386
include
/cygdrive/c/Program Files/Java/jdk1.7.0_25//include/win32
/usr/lib/gcc/i686-w64-mingw32/4.7.3/include/c++
/usr/lib/gcc/i686-w64-mingw32/4.7.3/include/c++/i686-w64-mingw32
/usr/lib/gcc/i686-w64-mingw32/4.7.3/include/c++/backward
/usr/lib/gcc/i686-w64-mingw32/4.7.3/include
/usr/lib/gcc/i686-w64-mingw32/4.7.3/include-fixed
/usr/i686-w64-mingw32/sys-root/mingw/include


Reply to this email directly or view it on GitHubhttps://github.com//issues/72#issuecomment-21352703
.

from avian.

joshuawarner32 avatar joshuawarner32 commented on May 19, 2024

The important thing to note about the /home/{user}/win32 is that it is adjacent to my avian checkout (in /home/{user}/avian). Note that the win32 directory is just a checkout of https://github.com/ReadyTalk/win32.

That said, I don't think that's your problem - or, at least not your first one. That won't contain any of the standard c headers like stdlib.h.

from avian.

hydra1983 avatar hydra1983 commented on May 19, 2024

After upgrade to 1.7.22, I got this error:

edison@edison-PC /local/src/avian
$ make
compiling build/windows-i386/vm/system/windows-build.o
src/vm/system/windows.cpp:52:1: error: ‘_Ret_maybenull_’ does not name a
type
src/vm/system/windows.cpp:64:1: error: ‘_Ret_maybenull_’ does not name a
type
makefile:1717: recipe for target
`build/windows-i386/vm/system/windows-build.o' failed
make: *** [build/windows-i386/vm/system/windows-build.o] Error 1

from avian.

joshuawarner32 avatar joshuawarner32 commented on May 19, 2024

Aha! Yep. That's the next error I ran into. Try applying this patch:

diff --git a/src/vm/system/windows.cpp b/src/vm/system/windows.cpp
index c611f69..49976ef 100644
--- a/src/vm/system/windows.cpp
+++ b/src/vm/system/windows.cpp
@@ -27,6 +27,7 @@
 #include <avian/vm/system/system.h>
 #include <avian/util/runtime-array.h>

+#if 0
 #if defined(WINAPI_FAMILY)

 #if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
@@ -92,6 +93,8 @@ UnmapViewOfFile(

 #endif

+#endif
+
 #define ACQUIRE(s, x) MutexResource MAKE_NAME(mutexResource_) (s, x)

 using namespace vm;

from avian.

hydra1983 avatar hydra1983 commented on May 19, 2024

Should I create a file with ext. patch and paste what you provided and apply that file?
I tried this ,but tortoise git reports format detection error. :(

from avian.

joshuawarner32 avatar joshuawarner32 commented on May 19, 2024

I always use 'git apply file.patch' from the command line. I'm not familiar with tortoiseGit.

This is a really simple patch, though - you could just manually edit it in. The two inserted lines are at 30 and 95 (in the original file).

from avian.

hydra1983 avatar hydra1983 commented on May 19, 2024

I saved the content to a file named windows.diff, and run "git apply {path}/windows.diff", it reports:

edison@edison-PC /local/src/avian
$ git apply C:/Users/edison/Desktop/windows.diff
fatal: corrupt patch at line 8

I will manually edit the file.
Really appreciate your help with this.

from avian.

hydra1983 avatar hydra1983 commented on May 19, 2024

It works.

from avian.

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.