ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:67137] [ruby-trunk - Bug #10651] [Open] pkg_config does not report required include headers
       [not found] <redmine.issue-10651.20141225214216@ruby-lang.org>
@ 2014-12-25 21:42 ` anatol.pomozov
  2014-12-27 14:39 ` [ruby-core:67166] [ruby-trunk - Bug #10651] " anatol.pomozov
  2019-07-08  3:19 ` [ruby-core:93609] [Ruby master Bug#10651] " merch-redmine
  2 siblings, 0 replies; 3+ messages in thread
From: anatol.pomozov @ 2014-12-25 21:42 UTC (permalink / raw
  To: ruby-core

Issue #10651 has been reported by Anatol Pomozov.

----------------------------------------
Bug #10651: pkg_config does not report required include headers
https://bugs.ruby-lang.org/issues/10651

* Author: Anatol Pomozov
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
pkg_config behavior seems incorrect in 2.2.0. I am testing following script in Linux Arch:

`require 'mkmf'
puts pkg_config("xft")`

In 2.1.5 it gives
`["-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz", "", "-lXft"]`

In 2.2.0 it gives
`["", "", "-lXft"]`

pkg-config command line tool gives.

`$ pkg-config --cflags xft
-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz`

So it points that new pkg_config implementation is incorrect.


Here is content of the pc file itself:

$ cat /usr/lib/pkgconfig/xft.pc 
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: Xft
Description: X FreeType library
Version: 2.3.2
Requires: xproto
Requires.private: xrender, fontconfig, freetype2
Cflags: -I${includedir}
Libs: -L${libdir} -lXft



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:67166] [ruby-trunk - Bug #10651] pkg_config does not report required include headers
       [not found] <redmine.issue-10651.20141225214216@ruby-lang.org>
  2014-12-25 21:42 ` [ruby-core:67137] [ruby-trunk - Bug #10651] [Open] pkg_config does not report required include headers anatol.pomozov
@ 2014-12-27 14:39 ` anatol.pomozov
  2019-07-08  3:19 ` [ruby-core:93609] [Ruby master Bug#10651] " merch-redmine
  2 siblings, 0 replies; 3+ messages in thread
From: anatol.pomozov @ 2014-12-27 14:39 UTC (permalink / raw
  To: ruby-core

Issue #10651 has been updated by Anatol Pomozov.


The commit that produced this behavior change is 097c3e9cbbf23718371f08c24b2d2297b039f63f in particular this part:

~~~
     orig_ldflags = $LDFLAGS
     if get and option
       get[option]
     elsif get and try_ldflags(ldflags = get['libs'])
-      cflags = get['cflags']
+      if incflags = get['cflags-only-I']
+        $INCFLAGS << " " << incflags
+        cflags = get['cflags-only-other']
+      else
+        cflags = get['cflags']
+      end
       libs = get['libs-only-l']
       ldflags = (Shellwords.shellwords(ldflags) - Shellwords.shellwords(libs)).quote.join(" ")
       $CFLAGS += " " << cflags
~~~

Could anyone explain what this change tries to do?

----------------------------------------
Bug #10651: pkg_config does not report required include headers
https://bugs.ruby-lang.org/issues/10651#change-50655

* Author: Anatol Pomozov
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
pkg_config behavior seems incorrect in 2.2.0. I am testing following script in Linux Arch:

`require 'mkmf'
puts pkg_config("xft")`

In 2.1.5 it gives
`["-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz", "", "-lXft"]`

In 2.2.0 it gives
`["", "", "-lXft"]`

pkg-config command line tool gives.

`$ pkg-config --cflags xft
-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz`

So it points that new pkg_config implementation is incorrect.


Here is content of the pc file itself:

$ cat /usr/lib/pkgconfig/xft.pc 
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: Xft
Description: X FreeType library
Version: 2.3.2
Requires: xproto
Requires.private: xrender, fontconfig, freetype2
Cflags: -I${includedir}
Libs: -L${libdir} -lXft



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ruby-core:93609] [Ruby master Bug#10651] pkg_config does not report required include headers
       [not found] <redmine.issue-10651.20141225214216@ruby-lang.org>
  2014-12-25 21:42 ` [ruby-core:67137] [ruby-trunk - Bug #10651] [Open] pkg_config does not report required include headers anatol.pomozov
  2014-12-27 14:39 ` [ruby-core:67166] [ruby-trunk - Bug #10651] " anatol.pomozov
@ 2019-07-08  3:19 ` merch-redmine
  2 siblings, 0 replies; 3+ messages in thread
From: merch-redmine @ 2019-07-08  3:19 UTC (permalink / raw
  To: ruby-core

Issue #10651 has been updated by jeremyevans0 (Jeremy Evans).

File mkmf-pkgconfig-return-value.patch added

anatolik (Anatol Pomozov) wrote:
> Could anyone explain what this change tries to do?

It tries to separate the `-I` cflags from the non `-I` ones, as they are stored in different global variables.  In general it probably doesn't cause problems in mkmf because it is used for the side effect of modifying the global variables.  However, the return value should probably be fixed to include the `-I` cflags.  Attached is a patch that does that.

----------------------------------------
Bug #10651: pkg_config does not report required include headers
https://bugs.ruby-lang.org/issues/10651#change-79206

* Author: anatolik (Anatol Pomozov)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
pkg_config behavior seems incorrect in 2.2.0. I am testing following script in Linux Arch:

`require 'mkmf'
puts pkg_config("xft")`

In 2.1.5 it gives
`["-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz", "", "-lXft"]`

In 2.2.0 it gives
`["", "", "-lXft"]`

pkg-config command line tool gives.

`$ pkg-config --cflags xft
-I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz`

So it points that new pkg_config implementation is incorrect.


Here is content of the pc file itself:

$ cat /usr/lib/pkgconfig/xft.pc 
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: Xft
Description: X FreeType library
Version: 2.3.2
Requires: xproto
Requires.private: xrender, fontconfig, freetype2
Cflags: -I${includedir}
Libs: -L${libdir} -lXft

---Files--------------------------------
mkmf-pkgconfig-return-value.patch (1.48 KB)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-08  3:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-10651.20141225214216@ruby-lang.org>
2014-12-25 21:42 ` [ruby-core:67137] [ruby-trunk - Bug #10651] [Open] pkg_config does not report required include headers anatol.pomozov
2014-12-27 14:39 ` [ruby-core:67166] [ruby-trunk - Bug #10651] " anatol.pomozov
2019-07-08  3:19 ` [ruby-core:93609] [Ruby master Bug#10651] " merch-redmine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).