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

SIGUSR1が定義されていない #2

Open
yumetodo opened this issue Dec 11, 2015 · 7 comments
Open

SIGUSR1が定義されていない #2

yumetodo opened this issue Dec 11, 2015 · 7 comments
Assignees
Labels

Comments

@yumetodo
Copy link
Contributor

emumem.cpp: In member function 'void emulator::memory::report_fault(target_addr_t, unsigned int, emulator::memory_fault_info_t*)':
emumem.cpp:385:8: error: 'SIGUSR1' was not declared in this scope
  raise(SIGUSR1);
        ^

どこで定義されているんだろうか

@173210 173210 added the bug label Dec 11, 2015
@173210 173210 self-assigned this Dec 11, 2015
@173210
Copy link
Member

173210 commented Dec 11, 2015

csignal is included, so it should work fine. Please tell me the detail of your environment.

#include <csignal>

@yumetodo
Copy link
Contributor Author

My signal.h/csignal has no definition of SIGUSR1.

My environment:

Windows7 64bit
msys2 mingw64 gcc

Using built-in specs.
COLLECT_GCC=C:\msys64\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-5.2.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --with-gxx-include-dir=/mingw64/include/c++/5.2.0 --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev4, Built by MSYS2 project' --with-bugurl=http://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 5.2.0 (Rev4, Built by MSYS2 project)

@173210
Copy link
Member

173210 commented Dec 11, 2015

Can you tell me uname -a?

If you use MSYS2, update your msys2-runtime-devel.

$ pacman -Qo /usr/include/sys/signal.h
/usr/include/sys/signal.h is owned by msys2-runtime-devel 2.2.1.16655.6ecd782-2

@yumetodo
Copy link
Contributor Author

$ uname -a
MINGW64_NT-6.1 yumetodo-MSI 2.4.0(0.292/5/3) 2015-11-23 08:33 x86_64 Msys
$ pacman -Qo /usr/include/sys/signal.h
/usr/include/sys/signal.h は msys2-runtime-devel 2.4.0.16752.6eb10ef-1 によって保有されています

@173210
Copy link
Member

173210 commented Dec 12, 2015

Use MSYS2 instead of MinGW-w64.

@yumetodo
Copy link
Contributor Author

Use MSYS2 instead of MinGW-w64.

I'm using msys2.
http://qiita.com/yumetodo/items/bd41f31f39dd590e8c80#msys2-mingw-clang%E3%82%92%E3%81%A4%E3%81%8B%E3%81%86
This is how I install msys2 and gcc.

$ pacman -Sl | grep gcc
mingw32 mingw-w64-i686-gcc 5.2.0-4 [インストール済み]
mingw32 mingw-w64-i686-gcc-ada 5.2.0-4
mingw32 mingw-w64-i686-gcc-fortran 5.2.0-4
mingw32 mingw-w64-i686-gcc-libgfortran 5.2.0-4
mingw32 mingw-w64-i686-gcc-libs 5.2.0-4 [インストール済み]
mingw32 mingw-w64-i686-gcc-objc 5.2.0-4
mingw64 mingw-w64-x86_64-gcc 5.2.0-4 [インストール済み]
mingw64 mingw-w64-x86_64-gcc-ada 5.2.0-4
mingw64 mingw-w64-x86_64-gcc-fortran 5.2.0-4
mingw64 mingw-w64-x86_64-gcc-libgfortran 5.2.0-4
mingw64 mingw-w64-x86_64-gcc-libs 5.2.0-4 [インストール済み]
mingw64 mingw-w64-x86_64-gcc-objc 5.2.0-4
msys gcc 4.9.2-6
msys gcc-fortran 4.9.2-6
msys gcc-libs 4.9.2-6 [インストール済み]
msys mingw-w64-cross-gcc 4.9.2-3

Which gcc should I use?

@173210
Copy link
Member

173210 commented Dec 12, 2015

@yumetodo The MSYS one. The MinGW one searches a different directory for header files.

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

No branches or pull requests

2 participants