Author Topic: wxPdfDocument: Error while compiling with wxgtk-3.0 - 'fontconfig/fontconfig.h'  (Read 448 times)

Offline demetrioussharpe

  • Multiple posting newcomer
  • *
  • Posts: 11
Hello all,

I have been trying to build C::B on FreeBSD for a few months, with no success. Here is my ./configure command:

./configure --with-wx-config=/usr/local/bin/wxgtk2u-3.0-config --with-boost-libdir=/usr/local/lib/ --includedir=/usr/local/include/ --with-contrib-plugins=all

The point is to build it with wxgtk 3.0 to avoid a very nasty bug. However, regardless of which version of C::B I attempt to build, I always run into the problem of wxPdfDocument failing to compile 'src/pdffontmanager.cpp'. For some reason, pdffontmanager.cpp can't find 'fontconfig/fontconfig.h', even though the Makefile has the correct include directory to find 'fontconfig'. The preprocessors seem to be looking for wxgtk 2.0. Has anyone successfully built everything for wxgtk 3.0? I really need some help, here. Here's my pastebin:

https://pastebin.com/jESNHBw0

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5991
    • My Best Post
Quote
__WXGTK20__    GTK+ 2.0 or higher

You wish to use wxGTK version 3.0 instead of 2.8, correct?
Or do you mean you want to use GTK 3 instead of GTK 2?

What is the full path to 'fontconfig/fontconfig.h'?

Edit: Found what may be the upstream source of wxPdfDocument https://utelle.github.io/wxpdfdoc/

Tim S.
« Last Edit: December 02, 2017, 10:02:18 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10404
It will be good if you can post the full build log. The thing you've posted is not enough to resolve the problem.
CB builds fine on Linux and I think wxpdfdocument builds fine on OSX, too (which is closer to a BSD than linux).
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline demetrioussharpe

  • Multiple posting newcomer
  • *
  • Posts: 11
You wish to use wxGTK version 3.0 instead of 2.8, correct?

Correct

Quote
What is the full path to 'fontconfig/fontconfig.h'?

/usr/local/include/fontconfig/fontconfig.h

Quote
Edit: Found what may be the upstream source of wxPdfDocument https://utelle.github.io/wxpdfdoc/

I'll give it a look.

Offline demetrioussharpe

  • Multiple posting newcomer
  • *
  • Posts: 11
It will be good if you can post the full build log.The thing you've posted is not enough to resolve the problem.

Assuming that C::B creates a build log, where would I find it? I ask because the majority of the build info seems to be too big for the terminal to contain it all.

Quote
CB builds fine on Linux and I think wxpdfdocument builds fine on OSX, too (which is closer to a BSD than linux).

I'm not sure how well stock C::B compiles on FreeBSD. However, the stock version that's automatically built for ports & packages suffers from bug 348 (https://sourceforge.net/p/codeblocks/tickets/348/). Since the suggested fix is to build C::B for wx 3.0, that's what I'm attempting to do. I'm under the assumption that wxgtk 3.0 is wx 3.0. I hope that I'm not in error here. Either way, the build is not working.

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1587
Code: [Select]
Assuming that C::B creates a build log, where would I find it? I ask because the majority of the build info seems to be too big for the terminal to contain it all.if you are building it over terminal the ?stream? ">" operator will generate you a log
Code: [Select]
make > build.log

Offline demetrioussharpe

  • Multiple posting newcomer
  • *
  • Posts: 11

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10404
I don't see the error messages there...

What version are you building?
Why is fontconfig in /usr/local/? On most systems it is not in the default search paths and it is possible that we ignore --includedir=/usr/local/include/.
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline BlueHazzard

  • Lives here!
  • ****
  • Posts: 1587
The log is huge, so I had to split it up.
Better would be to zip, gz or 7zip it and upload it here.

I don't see the error messages there...
Are the errors from make files put into the stderr stream?
[EDIT:] gcc puts the errors to the error stream, so you have to redirect this stream also to a file..

if so you have to modify your command and store also the error stream:
Code: [Select]
make > build.log 2> error.logor put all in one file
Code: [Select]
make > build.log 2>&1
Thank you for your collaboration!

PS.: For more information on streams: https://en.wikibooks.org/wiki/Bourne_Shell_Scripting/Files_and_streams
« Last Edit: December 05, 2017, 11:08:48 pm by BlueHazzard »

Offline demetrioussharpe

  • Multiple posting newcomer
  • *
  • Posts: 11
I don't see the error messages there...

In the third pastebin, you should see "src/pdffontmanager.cpp:51:12: fatal error: 'fontconfig/fontconfig.h' file not found".

Quote
What version are you building?

17.XX
Quote
Why is fontconfig in /usr/local/? On most systems it is not in the default search paths and it is possible that we ignore --includedir=/usr/local/include/.

GhostBSD is a derivative of FreeBSD. I can only assume that it's in "/usr/local/include" because that's where FreeBSD puts it. However, you know what they say about assumptions. Why ignore "--includedir" while publishing it as a configure option?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5991
    • My Best Post
I don't see the error messages there...

In the third pastebin, you should see "src/pdffontmanager.cpp:51:12: fatal error: 'fontconfig/fontconfig.h' file not found".

Quote
What version are you building?

17.XX
Quote
Why is fontconfig in /usr/local/? On most systems it is not in the default search paths and it is possible that we ignore --includedir=/usr/local/include/.

GhostBSD is a derivative of FreeBSD. I can only assume that it's in "/usr/local/include" because that's where FreeBSD puts it. However, you know what they say about assumptions. Why ignore "--includedir" while publishing it as a configure option?

Has anyone tested the "--includedir" option in CB configure lately; I did NOT know it existed.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline demetrioussharpe

  • Multiple posting newcomer
  • *
  • Posts: 11
Better would be to zip, gz or 7zip it and upload it here.

I'll do that next time.

Quote
if so you have to modify your command and store also the error stream:
Code: [Select]
make > build.log 2> error.logor put all in one file
Code: [Select]
make > build.log 2>&1

I received an error while attempting to use both of those commands:  Ambiguous output redirect.
I now realize that FreeBSD (& derivatives) use CSH as the shell, so I'm waiting on the next build attempt to finish.

Offline demetrioussharpe

  • Multiple posting newcomer
  • *
  • Posts: 11
Thank you for your collaboration!

Are most newcomers not collaborative? I'm just happy that you all are willing to help me on this. I tried in IRC (a few months ago) and couldn't get much help. I appreciate every one of you for helping me!

Offline demetrioussharpe

  • Multiple posting newcomer
  • *
  • Posts: 11
This time, I build with redirection using this:  make |& cat > cb_17_xx_build.log

This command redirects both stdout & stderr into the build log. The log's text size is 6.9kB.

Offline demetrioussharpe

  • Multiple posting newcomer
  • *
  • Posts: 11
In the Makefile for xcPdfDocument ("/home/adsharpesr/huge/tools/development/ide/release-17.xx/src/plugins/contrib/source_exporter/wxPdfDocument/Makefile"), on line 251, there's this:

CB_FONTCONFIG_CFLAGS = -I/usr/local/include -I/usr/local/include/freetype2

I would imagine that it should be able to find "/usr/local/include/fontconfig/fontconfig.h".