Fatal error glib h no such file or directory

Hi everyone!

#1 2021-11-22 13:10:07

shako
Member
Registered: 2021-11-16
Posts: 39

glib.h: no such file or directory

Hi everyone!

I am trying to compile the surf browser, which I downloaded directly from the suckless website. However, trying to install it via «sudo make clean install» gives me:

fatal error: glib.h: no such file or directory

How do I overcome this? I installed glib2 but it didn’t help. I also have the glib.h file in /usr/include/glib-2.0/, maybe it is not found by the surf Makefile since it is not in its «standard» location?

Thanks in advance smile

Last edited by shako (2021-11-22 13:12:14)

#2 2021-11-22 13:14:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 18,296

Re: glib.h: no such file or directory

You’d normally run a make without install at first to actually do the build, and this is unlikely to be the entire output. Post the entire output. In any case, any particular reason you are trying to do this that way instead of using the AUR package: https://aur.archlinux.org/packages/surf ?

Last edited by V1del (2021-11-22 13:16:27)

#3 2021-11-22 13:19:12

shako
Member
Registered: 2021-11-16
Posts: 39

Re: glib.h: no such file or directory

Here is the output of make:

surf build options:
CC            = c99
Package webkit2gtk-4.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit2gtk-4.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'webkit2gtk-4.0', required by 'virtual:world', not found
CFLAGS        = -fPIC   -DVERSION="2.1" -DGCR_API_SUBJECT_TO_CHANGE  -DLIBPREFIX="/usr/local/lib" -DWEBEXTDIR="/usr/local/lib/surf"  -D_DEFAULT_SOURCE -O1
Package webkit2gtk-4.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit2gtk-4.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'webkit2gtk-4.0', required by 'virtual:world', not found
Package 'webkit2gtk-web-extension-4.0', required by 'virtual:world', not found
WEBEXTCFLAGS  = -fPIC  -O1
LDFLAGS       =
c99 -fPIC `pkg-config --cflags x11` `pkg-config --cflags gtk+-3.0 gcr-3 webkit2gtk-4.0` -DVERSION="2.1" -DGCR_API_SUBJECT_TO_CHANGE  -DLIBPREFIX="/usr/local/lib" -DWEBEXTDIR="/usr/local/lib/surf"  -D_DEFAULT_SOURCE -O1 -c surf.c
Package webkit2gtk-4.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit2gtk-4.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'webkit2gtk-4.0', required by 'virtual:world', not found
surf.c:9:10: fatal error: glib.h: No such file or directory
    9 | #include <glib.h>
      |          ^~~~~~~~
compilation terminated.
make: *** [Makefile:31: surf.o] Error 1

Also, here is the output of «pkg-config —cflags —libs glib2.0»:

-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -lglib-2.0

I generally keep dwm, surf, slock and dmenu in a folder in my home directory just because I find it easier to patch them and sync them with my forks on GitHub. I find it convenient and «clean», but I am still a newbie so I might be wrong! smile

Last edited by shako (2021-11-22 13:44:41)

#4 2021-11-22 14:38:10

seth
Member
Registered: 2012-09-03
Posts: 35,310

Re: glib.h: no such file or directory

Sanity check:

pacman -Qikk glib2
stat /usr/include/glib-2.0/glib.h

Also

Package webkit2gtk-4.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit2gtk-4.0.pc’
to the PKG_CONFIG_PATH environment variable
Package ‘webkit2gtk-4.0’, required by ‘virtual:world’, not found

#5 2021-11-22 14:46:02

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 1,975

Re: glib.h: no such file or directory

shako wrote:

Package webkit2gtk-4.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit2gtk-4.0.pc’
to the PKG_CONFIG_PATH environment variable
Package ‘webkit2gtk-4.0’, required by ‘virtual:world’, not found

That’s the actual issue, it makes the whole

pkg-config --cflags gtk+-3.0 gcr-3 webkit2gtk-4.0

command fail. The output of

pkg-config --cflags --libs glib2.0

is irrelevant, that is nowhere used in the compiler command.

#6 2021-11-22 14:56:11

shako
Member
Registered: 2021-11-16
Posts: 39

Re: glib.h: no such file or directory

arojas wrote:

That’s the actual issue, it makes the whole

pkg-config --cflags gtk+-3.0 gcr-3 webkit2gtk-4.0

command fail.

That was it! It was sufficient to install the webkit2gtk package to fix everything. Thanks a lot @arojas smile

Содержание

  1. Arch Linux
  2. #1 2021-11-22 13:10:07
  3. glib.h: no such file or directory
  4. #2 2021-11-22 13:14:09
  5. Re: glib.h: no such file or directory
  6. #3 2021-11-22 13:19:12
  7. Re: glib.h: no such file or directory
  8. Linux : Glib was not found
  9. 2 Answers 2
  10. Arch Linux
  11. #1 2012-09-21 16:01:27
  12. [SOLVED] Suddenly can’t compile program, glib.h can’t be found.
  13. #2 2012-09-21 18:15:18
  14. Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.
  15. #3 2012-09-21 18:27:36
  16. Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.
  17. #4 2012-09-21 18:43:17
  18. Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.
  19. #5 2012-09-21 18:47:49
  20. Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.
  21. #6 2012-09-21 18:50:10
  22. Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.
  23. #7 2012-09-21 19:24:26
  24. Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.
  25. #8 2012-09-21 19:30:22
  26. Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.
  27. #9 2012-09-21 19:46:24
  28. Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.
  29. #10 2012-09-21 19:53:52
  30. Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.
  31. #11 2012-09-21 20:07:17
  32. Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.
  33. #12 2012-09-21 20:13:41
  34. Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.
  35. Installation Failed on Ubuntu 20, fatal error: glib-object.h: No such file or directory #3158
  36. Comments
  37. Possible install-time or require-time problem
  38. Are you using the latest version of sharp?
  39. Is this a problem with filesystem permissions?
  40. What is the complete output of running npm install —verbose sharp ?
  41. What is the output of running npx envinfo —binaries —system —npmPackages=sharp —npmGlobalPackages=sharp ?
  42. ‘glib.h’ file not found. #42930
  43. Comments

Arch Linux

You are not logged in.

#1 2021-11-22 13:10:07

glib.h: no such file or directory

I am trying to compile the surf browser, which I downloaded directly from the suckless website. However, trying to install it via «sudo make clean install» gives me:

How do I overcome this? I installed glib2 but it didn’t help. I also have the glib.h file in /usr/include/glib-2.0/, maybe it is not found by the surf Makefile since it is not in its «standard» location?

Thanks in advance

Last edited by shako (2021-11-22 13:12:14)

#2 2021-11-22 13:14:09

Re: glib.h: no such file or directory

You’d normally run a make without install at first to actually do the build, and this is unlikely to be the entire output. Post the entire output. In any case, any particular reason you are trying to do this that way instead of using the AUR package: https://aur.archlinux.org/packages/surf ?

Last edited by V1del (2021-11-22 13:16:27)

#3 2021-11-22 13:19:12

Re: glib.h: no such file or directory

Here is the output of make:

Also, here is the output of «pkg-config —cflags —libs glib2.0»:

any particular reason you are trying to do this that way instead of using the AUR package: https://aur.archlinux.org/packages/surf ?

I generally keep dwm, surf, slock and dmenu in a folder in my home directory just because I find it easier to patch them and sync them with my forks on GitHub. I find it convenient and «clean», but I am still a newbie so I might be wrong!

Last edited by shako (2021-11-22 13:44:41)

Источник

Linux : Glib was not found

I have a sample C project that use GLib Library. In that source code, it use :

When I compile, I found this error : «Glib.h : no such file or folder». I have google and find out that I should install this lib. So I use those command:

After that, I have checked and see already exist this header file in my system: usr/include/glib-2.0/glib.h But when I compile, I still meet problem above.

So I have change include line to :

So, after that, when I compile, I meet error inside glib.h header :

glib/galloca.h : no such file or directory. Because this error is inside system header file, I cannot modify anymore and still cannot compile.

I don’t know how to fix this. I have read some post, that they change makefile. But, because my project is compiled automatically by IDE (CodeBlock) and I cannot really write a makefile, so that method doesn’t suitable for me.

Please tell me a way to fix this.

2 Answers 2

There must be some problem with how you build. To compile C programs that use GLib, you need package libglib2.0-dev . You can either install it directly, or install libgtk2.0-dev , which pulls it in as a dependency. So you have the packages you need.

The correct way to compile a GLib program is to use -I with the path to the GLib include files. An example (from How to compile a helloworld GLib program? on askubuntu):

This should let you compile this program:

The errors you are getting indicate that you are not setting the include path ( -I ) correctly. How to do this depends on your build system/IDE.

In Code::Blocks, you must set the include path and the linker options in the appropriate configuration dialog. Run pkg-config —cflags —libs glib-2.0 , which will output something like

The directories after -I must be set in the compiler options of your project (should be under Project -> Build Options -> Search Directories), and the names after -l must be set in the linker settings. Another option is to create a Makefile, and let Code::Blocks use that.

Источник

Arch Linux

You are not logged in.

#1 2012-09-21 16:01:27

[SOLVED] Suddenly can’t compile program, glib.h can’t be found.

I’m in the process of refining the code of my first project and whilst doing so, making a basic Makefile so people using other distro’s can use it as well. I haven’t change any of the code, just removed some empty lines and fixed the outlining, so the error can’t be in the code itself (confirmed by using the old version that’s still on GitHub).

I have made a basic Makefile:

But when running make, I get the following error message:

I have declared the following in my program:

Why is this suddenly happening? It built fine before on 30-08-2012

Last edited by Unia (2012-09-21 20:13:56)

If you can’t sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. —Carlos Torres

#2 2012-09-21 18:15:18

Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.

I have done some more research and discovered that the glib.h file belongs to glib2. I do have the file (in /usr/include/glib-2.0/glib.h) and reinstalling glib2 didn’t help.

What is wrong with my system?

If you can’t sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. —Carlos Torres

#3 2012-09-21 18:27:36

Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.

I don’t know why it was working but now it isn’t. I am skeptical that you had «/usr/include/glib-2.0» in your default path of included files before it broke though. The «pkg-config» command helps with that.

#4 2012-09-21 18:43:17

Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.

I don’t know why it was working but now it isn’t. I am skeptical that you had «/usr/include/glib-2.0» in your default path of included files before it broke though. The «pkg-config» command helps with that.

Hm, that does seem to help. I then get a missing dep of gdk-pixbuf, which in turn requires gtk (yes, gtk 1!). I guess something is wrong with the notify part. I don’t know why though, it’s the same as it was.

Here’s the part of the PKGBUILD that I’m trying to make into a Makefile:

If you can’t sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. —Carlos Torres

#5 2012-09-21 18:47:49

Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.

Waaait a minute. Are you trying to convert a working PKGBUILD file into a Makefile?

If that’s the case, just copy what’s in the PKGBUILD file but replace any variables (anything inside «$<____>«).

#6 2012-09-21 18:50:10

Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.

Waaait a minute. Are you trying to convert a working PKGBUILD file into a Makefile?

If that’s the case, just copy what’s in the PKGBUILD file but replace any variables (anything inside «$<____>«).

But AFAIK, this: `pkg-config —cflags —libs libnotify` isn’t supposed to be in a Makefile. I thought I could do like this too: -lnotify.

If you can’t sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. —Carlos Torres

#7 2012-09-21 19:24:26

Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.

Oh, «pkg-config» is wonderful in a Makefile! For an example, here’s one of mine: http://qogreatness.git.sourceforge.net/ … 4d;hb=HEAD

«pkg-config» allows a compiler to find files even if they’re installed in non-standard locations. This way, you don’t have to «hard code» your Makefile.

#8 2012-09-21 19:30:22

Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.

Oh, «pkg-config» is wonderful in a Makefile! For an example, here’s one of mine: http://qogreatness.git.sourceforge.net/ … 4d;hb=HEAD

«pkg-config» allows a compiler to find files even if they’re installed in non-standard locations. This way, you don’t have to «hard code» your Makefile.

Okay. It indeed works when using pkg-config, but just for reference; what would be the correct way to do this, without using pkg-config?

If you can’t sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. —Carlos Torres

#9 2012-09-21 19:46:24

Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.

It indeed works when using pkg-config, but just for reference; what would be the correct way to do this, without using pkg-config?

Well, the «correct» way is to use pkg-config.

Do you understand what the «pkg-config» command is doing? Just copy it into a terminal window. For example:

In your Makefile, just delete the entire «pkg-config» command and replace it with the output from the terminal window and it will compile.

. But I still recommend using «pkg-config» in the Makefile!

#10 2012-09-21 19:53:52

Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.

So I could better use one pkg-config string, instead of specifying some statically (-lX11) and some with pkg-config?

(I just tried X11 with pkg-config but it couldn’t find it. Does this mean I have to define some static and some with pkg-config? EDIT: Also, iw doesn’t get found either. These come from -lX11 and -liw)

Is there some sort of README I can see which explains all this?

Last edited by Unia (2012-09-21 19:56:40)

If you can’t sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. —Carlos Torres

#11 2012-09-21 20:07:17

Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.

The Wikipedia article on pkg-config is fine. The simple rule is to use pkg-config if the library has a «.pc» file in «/usr/lib/pkgconfig», otherwise just add the library to your «gcc» command by hand. Even X11 (your example) can be used with pkg-build.

#12 2012-09-21 20:13:41

Re: [SOLVED] Suddenly can’t compile program, glib.h can’t be found.

The Wikipedia article on pkg-config is fine. The simple rule is to use pkg-config if the library has a «.pc» file in «/usr/lib/pkgconfig», otherwise just add the library to your «gcc» command by hand. Even X11 (your example) can be used with pkg-build.

Got it! I will read the article and think I’m good to go then. For now, the Makefiles I need are simple

If you can’t sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. —Carlos Torres

Источник

Installation Failed on Ubuntu 20, fatal error: glib-object.h: No such file or directory #3158

Possible install-time or require-time problem

  • I have read the documentation relating to installation.
  • I have ensured that the architecture and platform of Node.js used for npm install is the same as the architecture and platform of Node.js used at runtime.

Are you using the latest version of sharp?

  • I am using the latest version of sharp as reported by npm view sharp dist-tags.latest .

If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.

If you are using another package which depends on a version of sharp that is not the latest, please open an issue against that package instead.

Is this a problem with filesystem permissions?

No
If you are using npm v6 or earlier and installing as a root or sudo user, have you tried with the npm install —unsafe-perm flag?
Yes
If you are using npm v7 or later, does the user running npm install own the directory it is run in?
yes
If you are using the ignore-scripts feature of npm , have you tried with the npm install —ignore-scripts=false flag?
n/a

What is the complete output of running npm install —verbose sharp ?

What is the output of running npx envinfo —binaries —system —npmPackages=sharp —npmGlobalPackages=sharp ?

System:
OS: Linux 5.4 Ubuntu 20.04.4 LTS (Focal Fossa)
CPU: (2) x64 Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz
Memory: 1.45 GB / 3.84 GB
Container: Yes
Shell: 5.0.17 — /bin/bash
Binaries:
Node: 17.3.0 —

/.nvm/versions/node/v17.3.0/bin/node
npm: 8.3.0 —

The text was updated successfully, but these errors were encountered:

Источник

‘glib.h’ file not found. #42930

  • are reporting a bug others will be able to reproduce and not asking a question or requesting software. If you’re not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh. To get software added or changed in Homebrew please file a Pull Request
  • have a problem with brew install (or upgrade , reinstall ) a single, Homebrew/homebrew-core formula (not cask) on macOS? If it’s a general brew problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new/choose. If it’s a Linux problem please file this issue at https://github.com/Homebrew/linuxbrew-core/issues/new/choose. If it’s a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it’s a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • ran brew update and can still reproduce the problem?
  • ran brew doctor , fixed all issues and can still reproduce the problem?
  • ran brew gist-logs

Whoops, it looks like you created an issue without filling out the checklist and providing all the needed information from one of the issue templates: https://github.com/Homebrew/homebrew-core/issues/new/choose

As we need all this information to help you we’re closing this issue. If you add the necessary information to this issue (don’t create a new or duplicate issue, please) and comment to let us know, a Homebrew maintainer will check it out when they get the chance. If it’s deemed to be a valid issue then this issue may be reopened.

Источник

@iMichka

Looks like the error is in linuxbrew/xorg/libxt:

==> make check
Last 15 lines from /home/thackl/.cache/Homebrew/Logs/libxt/03.make:
gcc-5 -DHAVE_CONFIG_H -I. -I..  -I../include -I../include  -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -I/home/thackl/.linuxbrew/Cellar/libice/1.0.9/include -I/home/thackl/.linuxbrew/Cellar/libsm/1.2.2/include -I/home/thackl/.linuxbrew/Cellar/libxau/1.0.8/include -I/home/thackl/.linuxbrew/Cellar/libxdmcp/1.1.2/include -I/home/thackl/.linuxbrew/Cellar/libxcb/1.13/include -I/home/thackl/.linuxbrew/Cellar/libx11/1.6.6/include -I/home/thackl/.linuxbrew/Cellar/xorgproto/2018.4/include  -I/home/thackl/.linuxbrew/Cellar/glib/2.58.1/include/glib-2.0 -I/home/thackl/.linuxbrew/Cellar/glib/2.58.1/lib/glib-2.0/include -I/home/thackl/.linuxbrew/Cellar/pcre/8.42/include -g -O2 -c -o Event.o Event.c
Alloc.c:25:18: fatal error: glib.h: No such file or directory
compilation terminated.

https://gist.github.com/thackl/15b1d65065d99bce703b107d7f4913d1#file-install-L13-L17

@iMichka

@iMichka

I can not reproduce this.

Could you provide the full logs, with brew gist-logs libxt?

@Martingales

@stale

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@maxim-belkin

@Martingales Could you please try

  1. Updating Linuxbrew to the latest version and building libxt again?
  2. If (1) does not work, try building libxt without compile-time tests like so
brew install --without-test libxt

I was not able to reproduce the bug in a Linuxbrew container based on Ubuntu system (see the link below). I’ll try to see if it is reproducible in a different container.
https://gist.github.com/59575ae114d7791dc6878099ba5b4920

@maxim-belkin

40-core 64-bit haswell

woo-hoo!

@maxim-belkin

@maxim-belkin

@maxim-belkin

This bit is for @sjackman again:

At the moment I think there is a problem somewhere in Linuxbrew/brew. For some reason, Linuxbrew in CentOS detects /bin/sh as its SHELL (search for SHELL= in gist-logs) — it is /bin/bash in linuxbrew/linuxbrew. INSTALL file says about /bin/bash issue in Defining Variables section:

Unfortunately, this technique does not work for `CONFIG_SHELL’ due to
an Autoconf bug. Until the bug is fixed you can use this workaround:

CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash

but switching to bash alone does not help, and one has to replace @@HOMEBREW_CELLAR@@ with its actual values in all Makefiles like so (please ignore commented out lines):

diff --git a/Formula/libxt.rb b/Formula/libxt.rb
index 2dc8ad0..3ecf063 100644
--- a/Formula/libxt.rb
+++ b/Formula/libxt.rb
@@ -47,7 +47,11 @@ class Libxt < Formula
       --enable-specs=#{build.with?("specs") ? "yes" : "no"}
     ]
 
-    system "./configure", *args
+    ENV["CONFIG_SHELL"] = "/bin/bash"
+    system "/bin/bash", "./configure", "CONFIG_SHELL=/bin/bash", *args
+    inreplace Dir["../**/Makefile"].each do |s|
+       s.gsub! "@@HOMEBREW_CELLAR@@", HOMEBREW_CELLAR.to_s
+    end
     system "make"
     system "make", "check" if build.with? "test"
     system "make", "install"

After the above fix libxt can be built in CentOS7: https://gist.github.com/65783ae5b649f0555cb8c8f7825eefa1

@Martingales, could you please try reproducing your error in a Linuxbrew Docker container that is closest to your actual environment? You can find those at https://github.com/Linuxbrew/docker

@maxim-belkin

Quick note: to make libxt work, it is sufficient to do the inreplace block only (without the CONFIG_SHELL bit).

@maxim-belkin

@iMichka, at least in CentOS 7, r requires perl at build time (because there is no system perl)

@maxim-belkin

And pcre2 is an undeclared dependency with linkage

@maxim-belkin

@thackl, could you please do two things:

  1. Add the following line:
depends_on "perl" => :build

below

depends_on "cairo" => :recommended
  1. and then try installing r again? Please post gist-logs here in case of a failure.

@sjackman

@@HOMEBREW_CELLAR@@ is found in the bottle tarball, and it should be changed to the value of brew --cellar when the bottle is poured. The string @@HOMEBREW_CELLAR@@ should not occur in any keg after it is poured. My best guess is that file is not installed. Ensure that file is installed with which file; file --version. If that’s the problem, then a better error message is warranted when file is not installed.

@maxim-belkin

Your best guess is actually right — there is no file in our CentOS 7 image. There is no check for that in Linuxbrew at the moment.

@sjackman

@jaredsampson

I’ve encountered the same error message in an attempt to install tcl-tk. Here’s my brew gist-logs libxt full output, with the same glib.h error). But there may be something else happening, because I actually have both file and xargs (although on RHEL 6 these might be very old):

$ which file; file --version
/usr/bin/file
file-5.04
magic file from /etc/magic:/usr/share/misc/magic

$ which xargs; xargs --version
/usr/bin/xargs
xargs (GNU findutils) 4.4.2
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Eric B. Decker, James Youngman, and Kevin Dalley.
Built using GNU gnulib version e5573b1bad88bfabcda181b9e0125fb0c52b7d3b

@sjackman

@jaredsampson

Yeah, you hit the nail on the head.

$ xargs -0 file --no-dereference --print0 </dev/null
Usage: file [-bchikLNnprsvz0] [--apple] [--mime-encoding] [--mime-type]
            [-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...
       file -C [-m magicfiles]
       file [--help]

Is there a brewed version of file I can use to remedy this? I found xargs in findutils, installing that now.

@sjackman

The brewed version is in brew install file-formula. Brew may still prefer to use the copy in /usr/bin (which is a bug if the /usr/bin/ version is too old). You may need to use export HOMEBREW_NO_ENV_FILTERING=1 to work around that.

@jaredsampson

@sjackman Thanks for those suggestions. Unfortunately, updated xargs and file didn’t fix this error, even with HOMEBREW_NO_ENV_FILTERING=1.

$ export HOMEBREW_NO_ENV_FILTERING=1

$ which xargs
~/.linuxbrew/bin/xargs

$ which file
~/.linuxbrew/bin/file

$ brew install libxt
==> Installing libxt from linuxbrew/xorg
==> Downloading https://ftp.x.org/pub/individual/lib/libXt-1.1.5.tar.bz2
Already downloaded: /home/friesner/jms2435/.cache/Homebrew/downloads/21e8533dbc80c2b2d7e1ec38692b719246c04423b5ce75fd88ec8c23868463a7--libXt-1.1.5.tar.bz2
==> Downloading https://raw.githubusercontent.com/Linuxbrew/homebrew-xorg/master/Patches/patch_configure.diff
Already downloaded: /home/friesner/jms2435/.cache/Homebrew/downloads/5f01ae626182ebedababa1fa15c7f0dde334169ab0f5e985758de424f6203d7e--patch_configure.diff
==> Patching
==> Applying patch_configure.diff
patching file configure
Hunk #1 succeeded at 18224 (offset -423 lines).
==> ./configure --prefix=/home/friesner/jms2435/.linuxbrew/Cellar/libxt/1.1.5 --sysconfdir=/home/friesner/jms2435/.linuxbrew/etc --localstatedir=/home/friesner/jms2435/.linuxbrew
==> make
==> make check
Last 15 lines from /home/friesner/jms2435/.cache/Homebrew/Logs/libxt/03.make:
gcc-5 -DHAVE_CONFIG_H -I. -I..  -I../include -I../include  -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wlogical-op -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing -I/home/friesner/jms2435/.linuxbrew/Cellar/libice/1.0.9/include -I/home/friesner/jms2435/.linuxbrew/Cellar/libsm/1.2.2/include -I/home/friesner/jms2435/.linuxbrew/Cellar/libxau/1.0.8/include -I/home/friesner/jms2435/.linuxbrew/Cellar/libxdmcp/1.1.2/include -I/home/friesner/jms2435/.linuxbrew/Cellar/libxcb/1.13/include -I/home/friesner/jms2435/.linuxbrew/Cellar/libx11/1.6.6/include -I/home/friesner/jms2435/.linuxbrew/Cellar/xorgproto/2018.4/include  -I/home/friesner/jms2435/.linuxbrew/Cellar/glib/2.58.2/include/glib-2.0 -I/home/friesner/jms2435/.linuxbrew/Cellar/glib/2.58.2/lib/glib-2.0/include -I/home/friesner/jms2435/.linuxbrew/Cellar/pcre/8.42/include -g -O2 -c -o Event.o Event.c
Event.c:25:18: fatal error: glib.h: No such file or directory
Converters.c:25:18: fatal error: glib.h: No such file or directory
compilation terminated.
compilation terminated.
make[2]: *** [Makefile:628: Event.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:628: Converters.o] Error 1
Alloc.c:25:18: fatal error: glib.h: No such file or directory
compilation terminated.
make[2]: *** [Makefile:628: Alloc.o] Error 1
make[2]: Leaving directory '/home/friesner/jms2435/tmp/libxt-20190117-24175-nu4j2d/libXt-1.1.5/test'
make[1]: *** [Makefile:910: check-am] Error 2
make[1]: Leaving directory '/home/friesner/jms2435/tmp/libxt-20190117-24175-nu4j2d/libXt-1.1.5/test'
make: *** [Makefile:515: check-recursive] Error 1

READ THIS: https://github.com/Linuxbrew/brew/wiki/troubleshooting
Please do not report this issue to Homebrew/brew or Homebrew/core,
which support macOS only."

@sjackman

Try…

cat $(brew --prefix glib)/lib/pkgconfig/glib-2.0.pc
HOMEBREW_NO_ENV_FILTERING=1  brew reinstall glib
cat $(brew --prefix glib)/lib/pkgconfig/glib-2.0.pc
HOMEBREW_NO_ENV_FILTERING=1  brew install libxt

@maxim-belkin

@jaredsampson, to use file installed by Homebrew, you can use a hack similar to what I had to employ for CentOS 5 instructions:

  1. Install file-formula
  2. Create a symbolic link to file in /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super for it to be used during the installation in super environment.

@sjackman

@randy3k

I have the same error while installing r on a CentOS 7, I tried all the above solutions and none of them worked. At the end, I have to force installing a bottle.

brew install libxt --force-bottle

@sjackman

From libxt

  option "without-test", "Skip compile-time tests"
  option "with-glib", "Build with glib (for unit testing)"
  depends_on "glib" => [:build, :optional]

    system "make", "check" if build.with? "test"

Unit tests are enabled by default. From the comment it, as though the unit tests require glib. The dependency on glib however is not enabled by default.

Could someone please try this patch?

diff --git a/Formula/libxt.rb b/Formula/libxt.rb
index 2dc8ad0..3317b11 100644
--- a/Formula/libxt.rb
+++ b/Formula/libxt.rb
@@ -13,9 +13,8 @@ class Libxt < Formula
   option "without-test", "Skip compile-time tests"
   option "with-static", "Build static libraries (not recommended)"
   option "with-specs", "Build specifications"
-  option "with-glib", "Build with glib (for unit testing)"
 
-  depends_on "glib" => [:build, :optional]
+  depends_on "glib" => [:build, :recommended]
   depends_on "pkg-config" => :build
   depends_on "linuxbrew/xorg/libice"
   depends_on "linuxbrew/xorg/libsm"
@@ -49,7 +48,7 @@ class Libxt < Formula
 
     system "./configure", *args
     system "make"
-    system "make", "check" if build.with? "test"
+    system "make", "check" if build.with?("glib") && build.with?("test")
     system "make", "install"
   end
 end

@sjackman

Alternatively, make check could be disabled by default.

@sjackman

In Homebrew/core I see only 100 occurrences of "make", "check". Perhaps they’re moving away from running the unit tests.

@sjackman
sjackman

changed the title
r: fatal error: glib.h: No such file or directory

libxt: fatal error: glib.h: No such file or directory

Feb 21, 2019

@sjackman
sjackman

transferred this issue from Homebrew/linuxbrew-core

Feb 21, 2019

@sjackman

I’ve opened PR #461 to hopefully address this issue.

@maxim-belkin

@jaredsampson

@maxim-belkin @sjackman After the homebrew 2.0 migration, and I suspect due to the fix in #461, yes, I have been able to install libxt successfully with a simple brew install. Thanks again!

@sjackman

Thanks for following up, Jared!

Apropos of nothing, a colleague of mine is named Jared Simpson https://github.com/jts

  • Home
  • Forum
  • The Ubuntu Forum Community
  • Ubuntu Official Flavours Support
  • General Help
  • GLIB in C programming: No such file or directory

  1. GLIB in C programming: No such file or directory

    I a have C file where the
    where when I execute it via terminal:
    I get the error
    fatal error: glib-object.h: No such file or directoryI also tried

    Code:

    gcc -O2 $(pkg-config --cflags glib-2.0) -o test test.c $(pkg-config --libs glib-2.0)

    The headers of the C file

    Code:

    #include <stdlib.h>
    #include <stdio.h>
    #include <glib-object.h>
    #include <json-glib/json-glib.h>


  2. Re: GLIB in C programming: No such file or directory

    Do you have the developers package for glib 2.0 (libglib2.0-dev) installed ? Just having the library does not give you the headers, they are in the *-dev packages.
    Also, ‘pkg-config —libs’ outputs the ‘-l’ option for the linker-part of the gcc toolchain, it doesn’t produce the ‘-I’ option for the preprocessor which gives paths for the headers. You probably want ‘pkg-config —cflags —libs glib-2.0’ which does both.

    Holger


  3. Re: GLIB in C programming: No such file or directory

    How do I install the developers package for glib 2.0?


  4. Re: GLIB in C programming: No such file or directory

    Code:

    sudo apt install libglib2.0-dev

    in a terminal or with synaptic.

    Holger


  5. Re: GLIB in C programming: No such file or directory

    After I installed:

    Code:

    sudo apt install libglib2.0-dev

    And I execute
    The first error:
    fatal error: glib-object.h: No such file or directory

    Changes in to:
    fatal error: json-glib/json-glib.h: No such file or directory


  6. Re: GLIB in C programming: No such file or directory

    Did you install json-glib dev package?


  7. Re: GLIB in C programming: No such file or directory

    According to https://packages.ubuntu.com json-glib.h is in the package ‘libjson-glib-dev’.

    Holger


  8. Re: GLIB in C programming: No such file or directory

    After I installed

    Code:

    sudo apt-get install libjson-glib-dev

    When I try
    gcc test.c -o test

    The first error came back:
    fatal error: glib-object.h: No such file or directoryWhen I try

    Code:

    gcc -O2 $(pkg-config --cflags glib-2.0) -o test test.c $(pkg-config --libs glib-2.0)

    Changes in to:
    fatal error: json-glib/json-glib.h: No such file or directory

    Last edited by jenniferruurs; September 19th, 2019 at 08:49 AM.


  9. Re: GLIB in C programming: No such file or directory

    Quote Originally Posted by jenniferruurs
    View Post

    After I installed

    Code:

    sudo apt-get install libjson-glib-dev

    When I try
    gcc test.c -o test

    The first error came back:
    fatal error: glib-object.h: No such file or directoryWhen I try

    Code:

    gcc -O2 $(pkg-config --cflags glib-2.0) -o test test.c $(pkg-config --libs glib-2.0)

    Changes in to:
    fatal error: json-glib/json-glib.h: No such file or directory

    You need to tell the compiler where to find the necessary from your newly added package.

    Code:

    gcc -O2 $(pkg-config --cflags glib-2.0 json-glib-1.0) -o test test.c $(pkg-config --libs glib-2.0 json-glib-1.0)


  10. Re: GLIB in C programming: No such file or directory

    Thank you this did worked!

    Is there a way how I can added these files to gcc so that

    Would also work?

    Or isn’t that possible?


Bookmarks

Bookmarks


Posting Permissions

View previous topic :: View next topic  
Author Message
KatsuoRyuu
n00b
n00b

Joined: 08 Nov 2016
Posts: 54

PostPosted: Wed Apr 22, 2020 1:02 am    Post subject: gdm — fatal error: glib.h: No such file or director Reply with quote

Im trying to emerge gdm but im getting a `fatal error: glib.h: No such file or directory` every time, this is since the last update so im wondering whats going on.

steps i took:

1. revdep-rebuild

2. emerge @preserved-libs

3. remove and re-emerge glib

4. emerge -avDuNte world system

5. Adding repo gnome and gnome-next

6. everything again from 1-4

And nothing worked.

my emerge —info

Code:

Portage 2.3.99 (python 3.6.10-final-0, default/linux/amd64/17.1/desktop/gnome/systemd, gcc-9.3.0, glibc-2.30-r8, 5.5.5-gentoo-v1.1-amdgpu x86_64)

=================================================================

System uname: Linux-5.5.5-gentoo-v1.1-amdgpu-x86_64-AMD_A10-7870K_Radeon_R7,_12_Compute_Cores_4C+8G-with-gentoo-2.7

KiB Mem:    15309264 total,    184820 free

KiB Swap:   15668220 total,   9610748 free

Head commit of repository gentoo: cd12f1675fc458854086bf18dd46e5dff8ad68e4

Head commit of repository ArtSoftware: 5ee6c8b20f4a2437ee33316284c04c352d71545e

Head commit of repository atom: 25a37c84819353a2073531fde5c9bf0e54ff2d1f

Head commit of repository chaoslab: be11df7e103adf1b05f63bc7ed4eb04462729789

Head commit of repository gnome: 03664e2efda313a016be91ea34a38ffca7772bf7

Head commit of repository steam-overlay: ae3e928b83b722ae6197fc1bc78859b592b819e5

sh bash 5.0_p16

ld GNU ld (Gentoo 2.34 p1) 2.34.0

ccache version 3.7.9 [disabled]

app-shells/bash:          5.0_p16::gentoo

dev-java/java-config:     2.2.0-r4::gentoo

dev-lang/perl:            5.30.2::gentoo

dev-lang/python:          2.7.17-r2::gentoo, 3.6.10-r1::gentoo, 3.7.7-r1::gentoo, 3.8.2-r1::gentoo

dev-util/ccache:          3.7.9::gentoo

dev-util/cmake:           3.17.1::gentoo

sys-apps/baselayout:      2.7::gentoo

sys-apps/sandbox:         2.18::gentoo

sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo

sys-devel/automake:       1.11.6-r3::gentoo, 1.16.2::gentoo

sys-devel/binutils:       2.34::gentoo

sys-devel/gcc:            9.2.0-r4::gentoo, 9.3.0::gentoo

sys-devel/gcc-config:     2.2.1::gentoo

sys-devel/libtool:        2.4.6-r6::gentoo

sys-devel/make:           4.3::gentoo

sys-kernel/linux-headers: 5.6::gentoo (virtual/os-headers)

sys-libs/glibc:           2.30-r8::gentoo

Repositories:

gentoo

    location: /var/db/repos/gentoo

    sync-type: git

    sync-uri: https://anongit.gentoo.org/git/repo/gentoo.git

    priority: 10

ArtSoftware

    location: /var/lib/layman/ArtSoftware

    sync-type: git

    sync-uri: http://git.art-software.fr/ArtSoftware/portageLocalRepo.git

    masters: gentoo

    priority: 50

atom

    location: /var/lib/layman/atom

    sync-type: git

    sync-uri: https://github.com/elprans/atom-overlay.git

    masters: gentoo

    priority: 50

chaoslab

    location: /var/lib/layman/chaoslab

    sync-type: git

    sync-uri: https://gitlab.com/chaoslab/chaoslab-overlay.git

    masters: gentoo

    priority: 50

gnome

    location: /var/lib/layman/gnome

    sync-type: git

    sync-uri: https://anongit.gentoo.org/git/proj/gnome.git

    masters: gentoo

    priority: 50

gnome-next

    location: /var/lib/layman/gnome-next

    masters: gentoo

    priority: 50

steam-overlay

    location: /var/lib/layman/steam-overlay

    sync-type: git

    sync-uri: https://github.com/anyc/steam-overlay.git

    masters: gentoo

    priority: 50

ACCEPT_KEYWORDS=»amd64 ~amd64″

ACCEPT_LICENSE=»*»

CBUILD=»x86_64-pc-linux-gnu»

CFLAGS=»-O2 -pipe»

CHOST=»x86_64-pc-linux-gnu»

CONFIG_PROTECT=»/etc /usr/share/config /usr/share/gnupg/qualified.txt»

CONFIG_PROTECT_MASK=»/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c»

CXXFLAGS=»-O2 -pipe»

DISTDIR=»/var/cache/distfiles»

EMERGE_DEFAULT_OPTS=»—jobs 1″

ENV_UNSET=»DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR»

FCFLAGS=»-O2 -pipe»

FEATURES=»assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr»

FFLAGS=»-O2 -pipe»

GENTOO_MIRRORS=»http://distfiles.gentoo.org»

LANG=»en_US.utf8″

LDFLAGS=»-Wl,-O1 -Wl,—as-needed»

MAKEOPTS=»-j4″

PKGDIR=»/var/cache/binpkgs»

PORTAGE_CONFIGROOT=»/»

PORTAGE_RSYNC_OPTS=»—recursive —links —safe-links —perms —times —omit-dir-times —compress —force —whole-file —delete —stats —human-readable —timeout=180 —exclude=/distfiles —exclude=/local —exclude=/packages —exclude=/.git»

PORTAGE_TMPDIR=»/var/tmp»

USE=»X a52 aac accessibility acl acpi afs alsa amd64 amdgpu apache2 audiofile avahi bash-completion berkdb bidi bluetooth bzip2 cairo cdda cdr cjk cli colord crypt cups dbus dga dri dts dv dvb dvd dvdr eds emboss encode evo exif fbcon ffmpeg flac flickr fontconfig fortran gcj gdbm geolocation gif gles gmp gnome gnome-keyring gnome-online-accounts gphoto2 gpm graphviz gsm gstreamer gtk iconv icq icu idn ieee1394 imap initramfs inotify introspection ios ipod ipv6 jack java joystick jpeg jpeg2k kerberos ladspa lame lcms ldap libass libnotify libsecret libtirpc lm_sensors lzma lzo mad matroska mng modplug mono mp3 mp4 mpeg msn mtp multilib musepack musicbrainz mysql nas nautilus ncurses networkmanager nls nptl nsplugin ogg openal opencl openexr opengl openmp opus oss pam pango pcmcia pcre pda pdf perl pie plymouth png policykit postgres ppds pulseaudio python qt5 readline redistributable rss samba sasl savedconfig scanner sdl seccomp slp speex spell split-usr ssl startup-notification suid svg systemd tcl tcpd telepathy theora tiff tk tracker truetype udev udisks unicode unknown-license upower usb v4l vaapi vala vdpau vorbis vulkan wavpack webp wifi wmf wxwidgets x264 xattr xcb xine xinerama xml xpm xv xvid yahoo zeroconf zlib» ABI_X86=»64″ ADA_TARGET=»gnat_2018″ ALSA_CARDS=»emu10k1x darla20 darla24 emu10k1 gina20 gina24 hdsp hdspm ice1712 indigo indigoio layla20 layla24 mia mixart mona pcxhr rme32 rme96 sb16 sbawe sscape usbusx2y vx222 usb-usx2y» APACHE2_MODULES=»authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias» CALLIGRA_FEATURES=»karbon sheets words» CAMERAS=»agfa_cl20 casio_qv dimagev dimera3500 kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica_qm150 panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ricoh_g3 sipix_blink sipix_blink2 sipix_web2 sony_dscf1 sony_dscf55 toshiba_pdrm11 adc65 aox barbie canon clicksmart310 digigr8 digita directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 konica largan lg_gsm mars mustek pccam300 pccam600 ptp2 ricoh samsung sierra smal sonix soundvision spca50x sq905 stv0674 stv0680 sx330z template» COLLECTD_PLUGINS=»df interface irq load memory rrdtool swap syslog» CPU_FLAGS_X86=»mmx mmxext sse sse2″ ELIBC=»glibc» GPSD_PROTOCOLS=»ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx» INPUT_DEVICES=»evdev void wacom mtrack tslib synaptics» KERNEL=»linux» LCD_DEVICES=»bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text» LIBREOFFICE_EXTENSIONS=»presenter-console presenter-minimizer pdfimport wiki-publisher nlpsolver scripting-beanshell scripting-javascript» LIRC_DEVICES=»audio audio_alsa serial pctv» OFFICE_IMPLEMENTATION=»libreoffice» PHP_TARGETS=»php7-2″ POSTGRES_TARGETS=»postgres10 postgres11″ PYTHON_SINGLE_TARGET=»python3_6″ PYTHON_TARGETS=»python2_7 python3_6″ QEMU_SOFTMMU_TARGETS=»x86_64 arm cris i386 m68k microblaze mips mips64 mips64el mipsel ppc ppc64 ppcemb sh4 sh4eb sparc sparc64″ QEMU_USER_TARGETS=»alpha arm armeb cris i386 m68k microblaze mips mipsel ppc ppc64 ppc64abi32 sh4 sh4eb sparc sparc32plus sparc64 x86_64″ RUBY_TARGETS=»ruby24 ruby25″ USERLAND=»GNU» VIDEO_CARDS=»fbdev vesa radeonsi radeon amdgpu intel nouveau» XTABLES_ADDONS=»quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account»

Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

the short part of the log:

Code:

/bin/sh ../libtool  —tag=CC   —mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I. -I.. -DGNOMELOCALEDIR=»»/usr/share/locale»» -DBINDIR=»/usr/bin» -DDATADIR=»/usr/share» -DDMCONFDIR=»/etc/dm» -DGDMCONFDIR=»/etc/gdm» -DGDMLOCALEDIR=»/etc/gdm» -DLIBDIR=»/usr/lib64″ -DLIBEXECDIR=»/usr/libexec» -DLOGDIR=»/var/log/gdm» -DSBINDIR=»/usr/sbin» -DGNOMELOCALEDIR=»»/usr/share/locale»» -DGDM_DEFAULTS_CONF=»/usr/share/gdm/defaults.conf» -DGDM_CUSTOM_CONF=»/etc/gdm/custom.conf» -DGDM_OLD_CONF=»/etc/gdm/gdm.conf» -DGDM_RUN_DIR=»/run/gdm» -DGDM_RUNTIME_CONF=»/run/gdm/custom.conf» -DGDM_SESSION_DEFAULT_PATH=»/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin» -O2 -pipe     -O2 -pipe   -O2 -pipe -c -o libgdmcommon_la-gdm-profile.lo `test -f ‘gdm-profile.c’ || echo ‘./’`gdm-profile.c

test-log.c:33:10: fatal error: glib.h: No such file or directory

   33 | #include <glib.h>

      |          ^~~~~~~~

compilation terminated.

make[2]: *** [Makefile:675: test-log.o] Error 1

make[2]: *** Waiting for unfinished jobs….

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -DGNOMELOCALEDIR=»/usr/share/locale» -DBINDIR=»/usr/bin» -DDATADIR=»/usr/share» -DDMCONFDIR=»/etc/dm» -DGDMCONFDIR=»/etc/gdm» -DGDMLOCALEDIR=»/etc/gdm» -DLIBDIR=»/usr/lib64″ -DLIBEXECDIR=»/usr/libexec» -DLOGDIR=»/var/log/gdm» -DSBINDIR=»/usr/sbin» -DGNOMELOCALEDIR=»/usr/share/locale» -DGDM_DEFAULTS_CONF=»/usr/share/gdm/defaults.conf» -DGDM_CUSTOM_CONF=»/etc/gdm/custom.conf» -DGDM_OLD_CONF=»/etc/gdm/gdm.conf» -DGDM_RUN_DIR=»/run/gdm» -DGDM_RUNTIME_CONF=»/run/gdm/custom.conf» -DGDM_SESSION_DEFAULT_PATH=»/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin» -O2 -pipe -O2 -pipe -O2 -pipe -c gdm-address.c  -fPIC -DPIC -o .libs/libgdmcommon_la-gdm-address.o

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -DGNOMELOCALEDIR=»/usr/share/locale» -DBINDIR=»/usr/bin» -DDATADIR=»/usr/share» -DDMCONFDIR=»/etc/dm» -DGDMCONFDIR=»/etc/gdm» -DGDMLOCALEDIR=»/etc/gdm» -DLIBDIR=»/usr/lib64″ -DLIBEXECDIR=»/usr/libexec» -DLOGDIR=»/var/log/gdm» -DSBINDIR=»/usr/sbin» -DGNOMELOCALEDIR=»/usr/share/locale» -DGDM_DEFAULTS_CONF=»/usr/share/gdm/defaults.conf» -DGDM_CUSTOM_CONF=»/etc/gdm/custom.conf» -DGDM_OLD_CONF=»/etc/gdm/gdm.conf» -DGDM_RUN_DIR=»/run/gdm» -DGDM_RUNTIME_CONF=»/run/gdm/custom.conf» -DGDM_SESSION_DEFAULT_PATH=»/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin» -O2 -pipe -O2 -pipe -O2 -pipe -c gdm-common.c  -fPIC -DPIC -o .libs/libgdmcommon_la-gdm-common.o

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -DGNOMELOCALEDIR=»/usr/share/locale» -DBINDIR=»/usr/bin» -DDATADIR=»/usr/share» -DDMCONFDIR=»/etc/dm» -DGDMCONFDIR=»/etc/gdm» -DGDMLOCALEDIR=»/etc/gdm» -DLIBDIR=»/usr/lib64″ -DLIBEXECDIR=»/usr/libexec» -DLOGDIR=»/var/log/gdm» -DSBINDIR=»/usr/sbin» -DGNOMELOCALEDIR=»/usr/share/locale» -DGDM_DEFAULTS_CONF=»/usr/share/gdm/defaults.conf» -DGDM_CUSTOM_CONF=»/etc/gdm/custom.conf» -DGDM_OLD_CONF=»/etc/gdm/gdm.conf» -DGDM_RUN_DIR=»/run/gdm» -DGDM_RUNTIME_CONF=»/run/gdm/custom.conf» -DGDM_SESSION_DEFAULT_PATH=»/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin» -O2 -pipe -O2 -pipe -O2 -pipe -c gdm-profile.c  -fPIC -DPIC -o .libs/libgdmcommon_la-gdm-profile.o

gdm-address.c:51:10: fatal error: glib-object.h: No such file or directory

   51 | #include <glib-object.h>

      |          ^~~~~~~~~~~~~~~

compilation terminated.

make[2]: *** [Makefile:696: libgdmcommon_la-gdm-address.lo] Error 1

gdm-common.c:32:10: fatal error: glib.h: No such file or directory

   32 | #include <glib.h>

      |          ^~~~~~~~

compilation terminated.

make[2]: *** [Makefile:703: libgdmcommon_la-gdm-common.lo] Error 1

gdm-profile.c:32:10: fatal error: glib.h: No such file or directory

   32 | #include <glib.h>

      |          ^~~~~~~~

compilation terminated.

make[2]: *** [Makefile:710: libgdmcommon_la-gdm-profile.lo] Error 1

make[2]: Leaving directory ‘/var/tmp/portage/gnome-base/gdm-3.34.1/work/gdm-3.34.1/common’

make[1]: *** [Makefile:563: all-recursive] Error 1

make[1]: Leaving directory ‘/var/tmp/portage/gnome-base/gdm-3.34.1/work/gdm-3.34.1’

make: *** [Makefile:493: all] Error 2

pastebin: https://pastebin.com/aXM28DUC

Is there anyone that has any idea on how to solve this issue?

Last edited by KatsuoRyuu on Tue Apr 28, 2020 1:06 pm; edited 2 times in total

Back to top

View user's profile Send private message

KatsuoRyuu
n00b
n00b

Joined: 08 Nov 2016
Posts: 54

PostPosted: Wed Apr 22, 2020 4:41 am    Post subject: Reply with quote

Okay i found the ebuild is causing trouble of some kind… seems going to:

/var/tmp/portage/gnome-base/gdm-3.34.1/work/gdm-3.34.1

then running:

Code:

make

fails, but after doing

Code:

./configure

make

make is now succeeding in compiling and is able to pull in glib.h

So now to figure out what mess the ebuild is making.

Back to top

View user's profile Send private message

KatsuoRyuu
n00b
n00b

Joined: 08 Nov 2016
Posts: 54

PostPosted: Wed Apr 22, 2020 4:57 am    Post subject: Reply with quote

Solved the issue, in my make.conf file I had

Code:

COMMON_CFLAGS=»-O2 -pipe»

Apparently the `-pipe` suddenly creates problem in the system, even though the entire system is initially build with that.

Removing `-pipe` from the `COMMON_CFLAGS` solved the issue:

Code:

COMMON_CFLAGS=»-O2″

[/code]

Back to top

View user's profile Send private message

Hu
Moderator
Moderator

Joined: 06 Mar 2007
Posts: 19773

PostPosted: Thu Apr 23, 2020 1:44 am    Post subject: Reply with quote

-pipe is a very safe option, and should not be causing this. Does the problem reliably reappear if you restore that option?
Back to top

View user's profile Send private message

KatsuoRyuu
n00b
n00b

Joined: 08 Nov 2016
Posts: 54

PostPosted: Sun Apr 26, 2020 8:07 am    Post subject: Reply with quote

Hi Hu

Yes, im still fighting it because it cannot be set globally and seems to be some kind of default, i have to force remove the `-pipe` to get it working. So currently the only way for me to compile GDM is to use.

Code:

CFLAGS=»-O2″ emerge -avu gnome-base/gdm

Back to top

View user's profile Send private message

Hu
Moderator
Moderator

Joined: 06 Mar 2007
Posts: 19773

PostPosted: Sun Apr 26, 2020 4:45 pm    Post subject: Reply with quote

Something very unusual is broken in your system if -pipe causes this problem. That flag has been widely recommended for more than a decade, and this is the first I have seen of someone having a problem with it. Can you reproduce the failure by running a single instance of gcc with that option, and then observe the failure vanish when you remove -pipe? You should be able to get a test gcc command line from the log of the failed package.
Back to top

View user's profile Send private message

KatsuoRyuu
n00b
n00b

Joined: 08 Nov 2016
Posts: 54

PostPosted: Tue Apr 28, 2020 1:11 pm    Post subject: Reply with quote

Hi Hu

Yes i dont know why it worked that one time, now the problem is back and yes -pipe is not the problem.

looking deeper trying to replicate the ebuilds process i noticed the following discrepency.

the manually build outputs the following build command:

Code:

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I. -I.. -DGNOMELOCALEDIR=»»/usr/share/locale»» -DBINDIR=»/usr/bin» -DDATADIR=»/usr/share» -DDMCONFDIR=»/etc/dm» -DGDMCONFDIR=»/etc/gdm» -DGDMLOCALEDIR=»/etc/gdm» -DLIBDIR=»/usr/lib64″ -DLIBEXECDIR=»/usr/libexec» -DLOGDIR=»/var/log/gdm» -DSBINDIR=»/usr/sbin» -DGNOMELOCALEDIR=»»/usr/share/locale»» -DGDM_DEFAULTS_CONF=»/usr/share/gdm/defaults.conf» -DGDM_CUSTOM_CONF=»/etc/gdm/custom.conf» -DGDM_OLD_CONF=»/etc/gdm/gdm.conf» -DGDM_RUN_DIR=»/run/gdm» -DGDM_RUNTIME_CONF=»/run/gdm/custom.conf» -DGDM_SESSION_DEFAULT_PATH=»/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin» -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -pthread -I/usr/include/gudev-1.0     -g -O2 -c -o test-log.o test-log.c

this looks correct to me as glib is in /usr/include/glib-2.0

but looking at the ebuild its getting the following:

Code:

x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -I. -I.. -DGNOMELOCALEDIR=»»/usr/share/locale»» -DBINDIR=»/usr/bin» -DDATADIR=»/usr/share» -DDMCONFDIR=»/etc/dm» -DGDMCONFDIR=»/etc/gdm» -DGDMLOCALEDIR=»/etc/gdm» -DLIBDIR=»/usr/lib64″ -DLIBEXECDIR=»/usr/libexec» -DLOGDIR=»/var/log/gdm» -DSBINDIR=»/usr/sbin» -DGNOMELOCALEDIR=»»/usr/share/locale»» -DGDM_DEFAULTS_CONF=»/usr/share/gdm/defaults.conf» -DGDM_CUSTOM_CONF=»/etc/gdm/custom.conf» -DGDM_OLD_CONF=»/etc/gdm/gdm.conf» -DGDM_RUN_DIR=»/run/gdm» -DGDM_RUNTIME_CONF=»/run/gdm/custom.conf» -DGDM_SESSION_DEFAULT_PATH=»/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin» -O2    -O2 -c -o test-log.o test-log.c

this is clearly an issue, its replacing the include parameters with -O2…

Where this comes from i dont know at the moment…

Back to top

View user's profile Send private message

KatsuoRyuu
n00b
n00b

Joined: 08 Nov 2016
Posts: 54

PostPosted: Tue Apr 28, 2020 1:16 pm    Post subject: Reply with quote

God! writing this last post i just realized that i was in need of a COMMON_FLAGS variable for a work, I just put that in the profile to avoid having to pass it all the time to the build we need at work…

COMMON_FLAGS is used by GDM, apparently the only ebuild that is using it as the rest of the system is compiling fine, is there no ruling on what global vars ebuilds are allowed to use?

Back to top

View user's profile Send private message

Hu
Moderator
Moderator

Joined: 06 Mar 2007
Posts: 19773

PostPosted: Wed Apr 29, 2020 2:16 am    Post subject: Reply with quote

Variables in make.conf become environment variables visible to the build system. Build systems are free to interpret the environment as they please. OpenSSL has a well known bug that its compilation fails with a weird error if $SYSTEM is defined. Generally, you should only set the well-known and well standardized variables in make.conf. For this case, I would consider it a bug in gdm that it expects to put include search directives into a variable that users can so easily override. It should only use that variable for flags users would want to override, such as optimization flags.
Back to top

View user's profile Send private message

KatsuoRyuu
n00b
n00b

Joined: 08 Nov 2016
Posts: 54

PostPosted: Sun May 03, 2020 11:10 pm    Post subject: Reply with quote

thanks for your input, and my thoughts exactly… I have hit the error on OpenSSL too, and the COMMON_CFLAGS for gdm seems even worse than SYSTEM lol.

sorry for the delays in response.

Back to top

View user's profile Send private message

Display posts from previous:   

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

  • Печать

Страницы: [1]   Вниз

Тема: #include <glib.h> почемуто не подключаэтса билд есенс есть а штоже делать?  (Прочитано 5635 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
merl


Оффлайн
ziv

Думаю, что нужно установить libglib-dev.


Оффлайн
merl

щ попробуэм …. :coolsmiley:


Оффлайн
merl

почти получилось  :D вопервых оно мне дало не glib а libglib1.2
и щяс вот такая ситуацыя….. я пока новичьок в линуксе и темболиэ в програмировании может хто подскажыт как ево заставить работать

root@akva:/home/andriy/Desktop# locate glib.h
/usr/include/glib-1.2/glib.h
/usr/share/doc/libglib1.2-dev/glib.html
root@akva:/home/andriy/Desktop# g++ b.c -o b
b.c:4:18: error: glib.h: No such file or directory
b.c: In function ‘int main()’:
b.c:261: error: ‘guint32’ was not declared in this scope
b.c:261: error: ‘g_rand_new_with_seed’ was not declared in this scope


Оффлайн
S.Tokarev

g++ -c b.c -o b -I/usr/include/glib-1.2

Или лучьше в самом файле b.c

#include <glib-1.2/glib.h>

« Последнее редактирование: 15 Июля 2008, 21:29:50 от S.Tokarev »


Оффлайн
Yurror

Есть вариант из учебника по glib
g++ -c b.c -o b.o `pkg-config —cflags glib-2.0`
Естественно это только компиляция. для линковки потребуется что-то вроде
g++ -o b b.o `pkg-config —libs glib-2.0`

P.S. конечно 2.0 надо заменить на вашу версию



Оффлайн
merl

ну всьо я полностью запутался файл который я щя компилю содержит только фактичиски
#include <glib.h>
когда я прошу систему найти glib она ево видит, когда в сишном файле или при компиляции я прописую к нему путь

root@akva:/home/andriy/Desktop# g++ b.c -o b.o -I/usr/include/glib-1.2
или в файле
#include <glib-1.2/glib.h>

получаю вот штото такоэ непонятное:

root@akva:/home/andriy/Desktop# g++ b.c -o b.o -I/usr/include/glib-1.2
У файлі включеному з b.c:4:
/usr/include/glib-1.2/glib.h:66:24: error: glibconfig.h: No such file or directory
In file included from b.c:4:
/usr/include/glib-1.2/glib.h:502: error: ‘gint32’ does not name a type
/usr/include/glib-1.2/glib.h:503: error: ‘guint32’ does not name a type
/usr/include/glib-1.2/glib.h:504: error: ‘guint32’ does not name a type
/usr/include/glib-1.2/glib.h:505: error: ‘gint32’ does not name a type
/usr/include/glib-1.2/glib.h:769: error: typedef ‘GDataForeachFunc’ is initialised (use __typeof__ instead)
/usr/include/glib-1.2/glib.h:769: error: ‘GQuark’ was not declared in this scope
/usr/include/glib-1.2/glib.h:770: error: expected primary-expression before ‘data’
/usr/include/glib-1.2/glib.h:771: error: expected primary-expression before ‘user_data’
/usr/include/glib-1.2/glib.h:840: error: ISO C++ forbids declaration of ‘guint8’ with no type
/usr/include/glib-1.2/glib.h:840: error: expected ‘;’ before ‘*’ token
/usr/include/glib-1.2/glib.h:1573: warning: ‘g_bit_nth_lsf’ initialised and declared ‘extern’
/usr/include/glib-1.2/glib.h:1573: error: ‘guint32’ was not declared in this scope
/usr/include/glib-1.2/glib.h:1574: error: expected primary-expression before ‘nth_bit’
/usr/include/glib-1.2/glib.h:1574: error: initializer expression list treated as compound expression
/usr/include/glib-1.2/glib.h:1591: warning: ‘g_bit_nth_msf’ initialised and declared ‘extern’
/usr/include/glib-1.2/glib.h:1591: error: ‘guint32’ was not declared in this scope
/usr/include/glib-1.2/glib.h:1592: error: expected primary-expression before ‘nth_bit’
/usr/include/glib-1.2/glib.h:1592: error: initializer expression list treated as compound expression
/usr/include/glib-1.2/glib.h:1737: error: expected ‘,’ or ‘…’ before ‘*’ token
/usr/include/glib-1.2/glib.h:1738: error: ISO C++ forbids declaration of ‘guint8’ with no type
/usr/include/glib-1.2/glib.h:1740: error: expected ‘,’ or ‘…’ before ‘*’ token
/usr/include/glib-1.2/glib.h:1741: error: ISO C++ forbids declaration of ‘guint8’ with no type
/usr/include/glib-1.2/glib.h:1773: error: ‘GQuark’ does not name a type
/usr/include/glib-1.2/glib.h:1774: error: ‘GQuark’ does not name a type
/usr/include/glib-1.2/glib.h:1775: error: ‘GQuark’ does not name a type
/usr/include/glib-1.2/glib.h:1776: error: ‘GQuark’ was not declared in this scope
/usr/include/glib-1.2/glib.h:1785: error: ‘GQuark’ has not been declared
/usr/include/glib-1.2/glib.h:1787: error: ‘GQuark’ has not been declared
/usr/include/glib-1.2/glib.h:1791: error: ‘GQuark’ has not been declared
/usr/include/glib-1.2/glib.h:1793: error: ‘GDataForeachFunc’ has not been declared
/usr/include/glib-1.2/glib.h:1816: error: ‘GQuark’ has not been declared
/usr/include/glib-1.2/glib.h:1818: error: ‘GQuark’ has not been declared
/usr/include/glib-1.2/glib.h:1822: error: ‘GQuark’ has not been declared
/usr/include/glib-1.2/glib.h:1824: error: ‘GDataForeachFunc’ has not been declared
/usr/include/glib-1.2/glib.h:2094: error: ‘guint16’ does not name a type
/usr/include/glib-1.2/glib.h:2095: error: ‘guint8’ does not name a type
/usr/include/glib-1.2/glib.h:2168: error: ‘GDateDay’ was not declared in this scope
/usr/include/glib-1.2/glib.h:2169: error: expected primary-expression before ‘month’
/usr/include/glib-1.2/glib.h:2170: error: ‘GDateYear’ was not declared in this scope
/usr/include/glib-1.2/glib.h:2170: error: initializer expression list treated as compound expression
/usr/include/glib-1.2/glib.h:2171: error: ‘guint32’ was not declared in this scope
/usr/include/glib-1.2/glib.h:2180: error: ‘GDateDay’ was not declared in this scope
/usr/include/glib-1.2/glib.h:2182: error: ‘GDateYear’ was not declared in this scope
/usr/include/glib-1.2/glib.h:2184: error: ‘guint32’ was not declared in this scope
/usr/include/glib-1.2/glib.h:2185: error: ‘GDateDay’ was not declared in this scope
/usr/include/glib-1.2/glib.h:2186: error: expected primary-expression before ‘month’
/usr/include/glib-1.2/glib.h:2187: error: ‘GDateYear’ was not declared in this scope
/usr/include/glib-1.2/glib.h:2187: error: initializer expression list treated as compound expression
/usr/include/glib-1.2/glib.h:2191: error: ‘GDateYear’ does not name a type
/usr/include/glib-1.2/glib.h:2192: error: ‘GDateDay’ does not name a type
/usr/include/glib-1.2/glib.h:2193: error: ‘guint32’ does not name a type
/usr/include/glib-1.2/glib.h:2219: error: ‘GTime’ has not been declared
/usr/include/glib-1.2/glib.h:2223: error: ‘GDateDay’ has not been declared
/usr/include/glib-1.2/glib.h:2225: error: ‘GDateYear’ has not been declared
/usr/include/glib-1.2/glib.h:2227: error: ‘GDateDay’ has not been declared
/usr/include/glib-1.2/glib.h:2229: error: ‘GDateYear’ has not been declared
/usr/include/glib-1.2/glib.h:2231: error: ‘guint32’ has not been declared
/usr/include/glib-1.2/glib.h:2252: error: ‘GDateYear’ was not declared in this scope
/usr/include/glib-1.2/glib.h:2253: error: ‘guint8’ does not name a type
/usr/include/glib-1.2/glib.h:2255: error: ‘guint8’ does not name a type
/usr/include/glib-1.2/glib.h:2256: error: ‘guint8’ does not name a type
/usr/include/glib-1.2/glib.h:2267: error: ‘gsize’ does not name a type
/usr/include/glib-1.2/glib.h:2354: error: expected `}’ before ‘GLIB_SYSDEF_POLLIN’
/usr/include/glib-1.2/glib.h:2355: error: expected initializer before ‘GLIB_SYSDEF_POLLOUT’
/usr/include/glib-1.2/glib.h:2360: error: expected constructor, destructor, or type conversion before ‘;’ token
/usr/include/glib-1.2/glib.h:2370: error: ‘GIOCondition’ has not been declared
/usr/include/glib-1.2/glib.h:2388: error: ‘GIOCondition’ has not been declared
/usr/include/glib-1.2/glib.h:2412: error: ‘GIOCondition’ has not been declared
/usr/include/glib-1.2/glib.h:2417: error: ‘GIOCondition’ has not been declared
/usr/include/glib-1.2/glib.h:2823: error: expected declaration before ‘}’ token

или когда я делаю вот так то ето меня воще выбивает из понимания слова «почему»

root@akva:/home/andriy/Desktop# g++ -c  b.c -o b.o ‘pkg-config —cflags glib1-2’

                                                                  g++: pkg-config —cflags glib1-2: No such file or directory
b.c:4:18: error: glib.h: No such file or directory

 :'( :'( :'( :'( :'( :'( :'( я не настолько опытен штоб понять в чьом здесь што


Оффлайн
Kwah

Сдаётся мне, что библиотека, которую ты поставил старовата.

$ aptitude search libglib | grep dev
v   libglib-dev                     —                                           
p   libglib-java-dev                — GLib bindings for Java (development files)
p   libglib1.2-dev                  — The GLib library of C routines (developmen
p   libglib2.0-dev                  — Development files for the GLib library   
p   libglibmm-2.4-dev               — C++ wrapper for the GLib toolkit (developm

А под рутом сидеть — это теперь такой экстремальный вид спорта?


Оффлайн
S.Tokarev

или когда я делаю вот так то ето меня воще выбивает из понимания слова «почему»

root@akva:/home/andriy/Desktop# g++ -c  b.c -o b.o ‘pkg-config —cflags glib1-2’

Апострофы не в ту сторону. Надо не  ‘ , а `

Но правильно будет
g++ -c b.c -o b.o `glib-config —cflags`
g++ b.o -o b.exe `glib-config —libs`

« Последнее редактирование: 16 Июля 2008, 13:56:55 от S.Tokarev »


Оффлайн
Yurror

Дожились… люди «копипастить» не умеют.
Скоро реально на прилавках появятся книжки типа «Клавиатура для идиотов» или «Мышка для даунов»
нужный апостроф находится на букве Ё, прямо под клавишей Esc, слева от 1, над клавишей Tab. Набирается легко и просто без всяких шифтов и прочей лабуды в английской раскладке


  • Печать

Страницы: [1]   Вверх

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Fatal error gettextwrapper unable to write language settings ок
  • Fatal error game has crashed and will close tales of arise
  • Fatal error game crashed truckers mp
  • Fatal error game content version mismatch detected cs go
  • Fatal error fstream no such file or directory

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии