Установка gosu на FreeBSD - PullRequest
       39

Установка gosu на FreeBSD

2 голосов
/ 22 марта 2019

Я пытаюсь установить этот Ruby gem на FreeBSD, и он терпит неудачу со следующей ошибкой:

# gem install gosu
Building native extensions. This could take a while...
ERROR:  Error installing gosu:
        ERROR: Failed to build gem native extension.

    current directory: /usr/local/lib/ruby/gems/2.4/gems/gosu-0.14.5/ext/gosu
/usr/local/bin/ruby24 -I /usr/local/lib/ruby/site_ruby/2.4 -r ./siteconf20190322-6847-x8s25j.rb extconf.rb
The Gosu gem requires some libraries to be installed system-wide.
See the following site for a list:
https://github.com/gosu/gosu/wiki/Getting-Started-on-Linux
cat: /proc/cpuinfo: No such file or directory
checking for -lopenal... yes
checking for AL/al.h... yes
creating Makefile

current directory: /usr/local/lib/ruby/gems/2.4/gems/gosu-0.14.5/ext/gosu
make "DESTDIR=" clean

current directory: /usr/local/lib/ruby/gems/2.4/gems/gosu-0.14.5/ext/gosu
make "DESTDIR="
compiling ../../src/Audio.cpp
In file included from ../../src/Audio.cpp:17:
../../src/SndFile.hpp:111:33: warning: field 'buffer' is uninitialized when used here [-Wuninitialized]
        : file(nullptr), reader(buffer.front_reader())
                                ^
../../src/SndFile.hpp:123:33: warning: field 'buffer' is uninitialized when used here [-Wuninitialized]
        : file(nullptr), reader(buffer.front_reader())
                                ^
2 warnings generated.
compiling ../../src/AudioImpl.cpp
compiling ../../src/Bitmap.cpp
compiling ../../src/BitmapIO.cpp
compiling ../../src/BlockAllocator.cpp
compiling ../../src/Channel.cpp
compiling ../../src/Color.cpp
compiling ../../src/DirectoriesApple.cpp
compiling ../../src/DirectoriesUnix.cpp
compiling ../../src/DirectoriesWin.cpp
compiling ../../src/FileUnix.cpp
../../src/FileUnix.cpp:53:47: error: use of undeclared identifier 'S_IRUSR'
    pimpl->fd = open(filename.c_str(), flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
                                              ^
../../src/FileUnix.cpp:53:55: error: use of undeclared identifier 'S_IWUSR'
    pimpl->fd = open(filename.c_str(), flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
                                                      ^
../../src/FileUnix.cpp:53:63: error: use of undeclared identifier 'S_IRGRP'
    pimpl->fd = open(filename.c_str(), flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
                                                              ^
../../src/FileUnix.cpp:53:71: error: use of undeclared identifier 'S_IWGRP'
    pimpl->fd = open(filename.c_str(), flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
                                                                      ^
../../src/FileUnix.cpp:53:79: error: use of undeclared identifier 'S_IROTH'
    pimpl->fd = open(filename.c_str(), flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
                                                                              ^
../../src/FileUnix.cpp:53:87: error: use of undeclared identifier 'S_IWOTH'
    pimpl->fd = open(filename.c_str(), flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
                                                                                      ^
6 errors generated.
*** Error code 1

Stop.
make: stopped in /usr/local/lib/ruby/gems/2.4/gems/gosu-0.14.5/ext/gosu

Другие вещи, которые я пробовал:

  • Переключение компиляторов - сclang и c ++ to g ++ и gcc.
  • Клонирование хранилища и сборка «вручную» - получили те же ошибки.

Возможно ли вообще установить его на FreeBSD?Поиски не дали ничего полезного.

1 Ответ

3 голосов
/ 23 марта 2019

В системе FreeBSD заголовки системы организованы немного иначе, чем в Linux.

Быстрый поиск человека показывает, что вам нужно

#include    <sys/types.h>
#include    <sys/stat.h>
#include    <fcntl.h>

чтобы сделать эти определения видимыми.

...