0

I am currently trying to compile a project (DOMJudge) and the compilation fails on cgroup_init in -lcgroup. When I looked to the script I found that this installer was looking for the gcc lib cgroup called by the flag -lcgroup.

But I don't find any information about such a lib on Linux or other systems.

gcc -lcgroup test.c also returned error.


I have already tried to replace -lcgroup by -lcgroups.


The software which is supposed to be executed is this one

| #ifdef __cplusplus
| extern "C"
| #endif
| char cgroup_init ();
| int
| main ()
| {
| return cgroup_init ();
|   ;
|   return 0;
| }

So with the C and C++ standard, if you want to compile with a system library you use the -l<libname> flag.

Brighter side
  • 392
  • 2
  • 14

2 Answers2

0

Simply follow the instructions.

The DOMJudge authors have already spent a considerable amount of time producing documentation that explains all this.

We can see libcgroup-dev included in the package installation command listed in the "Prerequisites" section.

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055
0

Because the package name is libcgroup-dev does not mean it has to install a libcgroup.a or .so into /lib for referencing as -lcgroup. It could install a libfoo or libbar instead. By that sf.net link above (and this is guess as I don't use the lib), it looks more like the libcgroup package installs libcg for reference as -lcg, which is what the compile command should use, and -dev just includes the headers that assume that main package is installed.

Do a ls libcg* in /lib and /lib64 to see what actual name might be, I suggest.

M. Ziegast
  • 165
  • 4