LinuxForum.Fans
Тема

Проблема со сборкой среды разработки Code::Blocks из исходников

Автор: nohup 10 сообщений 3728 просмотров
#70168

Имеем: архив .tar.bz2 с исходниками.
после распаковки читаю файл BUILD. Там нахожу раздел где описана сборка для *nix:

text
Unix build instructions:
------------------------
You need a working autotools environment (autoconf, automake, libtool, make, etc).
In a terminal, go to the top level folder.
If you fetched the sources from SVN, you need to bootstrap the program first. So type:

./bootstrap

This will adapt the project's configuration file to your environment. This only needs to be done once: the first time you checkout the SVN version.

After this, type the following:

./configure --with-contrib-plugins=all make make install

For the last step you must be root. That's it.

следуя инструкциям и доставляя нужные пакеты, дошел до вот этого (привожу конец вывода):

text
checking for GTK2... configure: error: Package requirements (gtk+-2.0 >= 2.0.0) were not met:

No package 'gtk+-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables GTK2_CFLAGS and GTK2_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

после этого я доставил либу gir1.0-gtk-2.0, опять запустил ./configure --with-contrib-plugins=all, картина та же.
что делать дальше?

#70185

root@asus:/home/system-root# dpkg -l | grep libgtk
ii libgtk2.0-0 2.20.1-1 The GTK+ graphical user interface library
ii libgtk2.0-bin 2.20.1-1 The programs for the GTK+ graphical user int
ii libgtk2.0-common 2.20.1-1 Common files for the GTK+ graphical user int
root@asus:/home/system-root#
#70205

пакеты libgtk2.0-0, libgtk2.0-bin и libgtk2.0-common у меня стоят:

text
root@msi:~# dpkg -l | grep libgtk
ii  libgtk-vnc-1.0-0                     0.3.10-2ubuntu2                                 A VNC viewer widget for GTK+ (runtime librar
ii  libgtk2-perl                         1:1.221-4ubuntu2                                Perl interface to the 2.x series of the Gimp
ii  libgtk2.0-0                          2.20.1-0ubuntu2                                 The GTK+ graphical user interface library
ii  libgtk2.0-bin                        2.20.1-0ubuntu2                                 The programs for the GTK+ graphical user int
ii  libgtk2.0-cil                        2.12.9-4                                        CLI binding for the GTK+ toolkit 2.12
ii  libgtk2.0-common                     2.20.1-0ubuntu2                                 Common files for the GTK+ graphical user int
ii  libgtkhtml-editor-common             1:3.29.6.is.3.28.3-0ubuntu2                     HTML rendering/editing library - editor widg
ii  libgtkhtml-editor0                   1:3.29.6.is.3.28.3-0ubuntu2                     HTML rendering/editing library - editor widg
ii  libgtkhtml3.14-19                    1:3.29.6.is.3.28.3-0ubuntu2                     HTML rendering/editing library - runtime fil
ii  libgtkmm-2.4-1c2a                    1:2.20.3-0ubuntu1                               C++ wrappers for GTK+ (shared libraries)
ii  libgtksourceview2.0-0                2.10.4-0ubuntu1                                 shared libraries for the GTK+ syntax highlig
ii  libgtksourceview2.0-common           2.10.4-0ubuntu1                                 common files for the GTK+ syntax highlightin
ii  libgtkspell0                         2.0.16-1                                        a spell-checking addon for GTK's TextView wi
root@msi:~# 

может быть проблема в этом?:

text
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GTK2_CFLAGS and GTK2_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

#70209

Проблема решилась установкой пакетов, найденных по запросу libgtk и их зависимостей:
libglib2.0-cil-dev
libglib2.0-dev
libglib2.0-doc
libgtk2.0-0-dbg
libgtk2.0-cil-dev
libgtk2.0-dev
libgtk2.0-doc

Следующий вопрос: в меню Gnome на ярлыке Code::Blocks висит команда codeblocks %F. Щелчком по ярлыку C::B не запускается. Лучше повесить на ярлык команду /usr/local/bin/codeblocks или оставить как есть и задать path?

#70361
nohup написал:
Следующий вопрос: в меню Gnome на ярлыке Code::Blocks висит команда codeblocks %F. Щелчком по ярлыку C::B не запускается. Лучше повесить на ярлык команду /usr/local/bin/codeblocks или оставить как есть и задать path?

смотря какой дистрибутив.
/usr/local/bin - не обычный путь для ПО. возможно проще и лучше было сконфигурировать с --with-prefix=/opt
но это уже поздно =)
пропишите лучше переменную пути.

#70911

то есть надо было ./configure --with-contrib-plugins=all
заменить на ./configure --with-contrib-plugins=all --with-prefix=/opt
?

#70912

если ./configure позволяет так, то да.
./configure --help расскажет.

#70916

спасибо, сейчас пересоберем

в help'е есть вот это:

text
Installation directories:
  --prefix=PREFIX         install architecture-independent files in PREFIX
                          [/usr/local]
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                          [PREFIX]

указывать только ./configure --with-contrib-plugins=all --prefix=/opt или добавить еще путь для "architecture-dependent files"?

#70921
nohup написал:
указывать только

да.

#70954

проблема решилась, надо было указать --prefix=/opt/codeblocks

Войдите или зарегистрируйтесь, чтобы ответить.