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

Failed in building go for it #116

Closed
Skinyi opened this issue Sep 17, 2017 · 5 comments
Closed

Failed in building go for it #116

Skinyi opened this issue Sep 17, 2017 · 5 comments

Comments

@Skinyi
Copy link

Skinyi commented Sep 17, 2017

System environment:Fedora 26(x86_64)
Problem:Failed When I try to build Go For It, and the error messages are:
"
Checking for modules 'gtk+-3.0;glib-2.0;libnotify'
-- Package 'libnotify', required by 'virtual:world', not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:412 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPkgConfig.cmake:588 (_pkg_check_modules_internal)
CMakeLists.txt:28 (pkg_check_modules)
"
And so I try to install libnotify,but it shows that:
"package libnotify-0.7.7-2.fc26.x86_64 had been installed "
So what should I do next?

@JMoerman
Copy link
Collaborator

In most Gnu/Linux systems software is often split up in multiple packages: the executable code, the debugging symbols and, in case of libraries, the development files. (In many cases you also have packages for data, documentation, etc... But that's besides the point here.)

Without the development files software that depends on a library can run, but can't be built.

Try installing the development files of libnotify, on fedora it should be called libnotify-devel.

@Skinyi
Copy link
Author

Skinyi commented Sep 18, 2017

Thanks for your professional reply and the issue is solved. But another problem comes, it seems that my making process failed, the error messages are:

[root@skinyi build]# make
[ 6%] Generating Constants.c;Utils.c;SettingsManager.c;TodoTask.c;TaskStore.c;TaskManager.c;view/TaskList.c;TaskTimer.c;view/TimerView.c;view/SettingsDialog.c;view/AboutDialog.c;view/ContributeDialog.c;view/MainWindow.c;Main.c
warning: --save-temps has no effect when -C or --ccode is set
/home/skinyi/download/go_for_it/Go-For-It/src/TaskStore.vala:89.22-89.25: error: Argument 1: Cannot pass value to reference or output parameter
this.remove (iter);
^^^^
/home/skinyi/download/go_for_it/Go-For-It/src/view/MainWindow.vala:520.50-520.53: error: Argument 1: Cannot convert from int64' to int'
_("You have %i seconds left").printf(secs), GOFI.APP_SYSTEM_NAME);
^^^^
Compilation failed: 2 error(s), 1 warning(s)
make[2]: *** [src/CMakeFiles/go-for-it.dir/build.make:117:src/go-for-it_valac.stamp] error 1
make[1]: *** [CMakeFiles/Makefile2:85:src/CMakeFiles/go-for-it.dir/all] error 2
make: *** [Makefile:130:all] error 2

I wonder if my valac version is undesirable, so i typed

valac --version

and it shows my installed version is Vala 0.36.4,but when i typed

glib --version

it shows not found, so how to solve this issue?

@JMoerman
Copy link
Collaborator

Both compilation errors are indeed caused by changes introduced in new versions of valac. The first error is caused by a change in the vala api for Gtk+-3.0, updating the code would break the code for older versions. (could be worked around with conditional compilation.)

The second error is caused by the compiler becoming more strict with format strings. This is something that needs to be improved in the code.

You can get it to build by replacing those two lines with this.remove (ref iter); and _("You have %i seconds left").printf((int)secs), GOFI.APP_SYSTEM_NAME); respectively.

Alternatively you could build and install the listbox-dnd branch. That branch needs some more testing, cleanups and code documentation, but it fixes a number of issues (including these two issues) and shouldn't miss any functionality or have major bugs.

@Skinyi
Copy link
Author

Skinyi commented Sep 18, 2017

Thanks, and the first suggestion is effective.

@Skinyi Skinyi closed this as completed Sep 18, 2017
@JMoerman
Copy link
Collaborator

Good to hear!

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

No branches or pull requests

2 participants