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

Missing ttf-dejavu/fontconfig dependencies for fastqc #5026

Closed
jrderuiter opened this issue Jun 22, 2017 · 48 comments
Closed

Missing ttf-dejavu/fontconfig dependencies for fastqc #5026

jrderuiter opened this issue Jun 22, 2017 · 48 comments

Comments

@jrderuiter
Copy link

jrderuiter commented Jun 22, 2017

If fontconfig or ttf-dejavu are not installed, fastqc can produce the following error:

java.lang.Error: Probable fatal error:No fonts found

which is identical to the error described here: https://stackoverflow.com/questions/14066525/java-lang-error-probable-fatal-errorno-fonts-found. This issue is at least encountered in the snakemake container used by snakemake-wrappers.

I think this error is not necessarily specific to fastqc, but likely a more general dependency of openjdk which is currently missing.

We can easily fix it for fontconfig by adding the dependency to the fastqc or openjdk recipes. However, for ttf-dejavu there does not seem to be an existing package as far as I can see. I have no experience with creating non-R/Python packages, so was wondering if someone would be prepared to build a ttf-dejavu package or otherwise provide me with pointers on how to do so.

@bgruening
Copy link
Member

@jrderuiter interesting! Can you move this issue to conda-forge? I guess we need to discuss this over there as it seems a general problem and general package.

@jrderuiter
Copy link
Author

Done: conda-forge/staged-recipes#3164.

@bgruening
Copy link
Member

Thanks!

@epruesse
Copy link
Member

The conda-forge openjdk package has the missing fonts (https://github.com/conda-forge/openjdk-feedstock/blob/master/recipe/build.sh#L24). The issue occurs only if openjdk is pulled from defaults.

@rspreafico
Copy link
Contributor

rspreafico commented Oct 27, 2017

Confirming this issue. As a result, the mulled FastQC Biocontainer based on this Bioconda recipe is not functional. The default OpenJDK should download ttf-dejavu the same way the conda-forge version does.

@daler
Copy link
Member

daler commented Oct 27, 2017

@rspreafico it looks like the fastqc container was last modified in May, while the missing fonts were added to the conda-forge openjdk in June. #6518 bumps the build number for fastqc. Once merged this should result in a new container containing an updated open-jdk that you can test.

@rspreafico
Copy link
Contributor

Thank you for the quick reply and turnaround, this is awesome

@bgruening
Copy link
Member

@rspreafico the container will be online in an ~1h.
Please reopen if this does not solve the problem.

@rspreafico
Copy link
Contributor

Hi @daler @bgruening unfortunately it seems that the new container still suffers from the same issue:

docker run -w `pwd` -v `pwd`:`pwd` --rm -i quay.io/biocontainers/fastqc:0.11.5--pl5.22.0_3 fastqc test.fastq.gz
[...]
Analysis complete for test.fastq.gz
Exception in thread "Thread-1" java.lang.Error: Probable fatal error:No fonts found.

@rspreafico rspreafico reopened this Oct 30, 2017
@epruesse
Copy link
Member

It's probably missing freetype.

@epruesse
Copy link
Member

It's installing the "wrong" openjdk:

$ docker run quay.io/biocontainers/fastqc:0.11.5--pl5.22.0_3 sh -c 'grep -H channel /usr/local/conda-meta/openjdk*'
/usr/local/conda-meta/openjdk-8.0.121-1.json:  "channel": "https://repo.continuum.io/pkgs/free/linux-64",
/usr/local/conda-meta/openjdk-8.0.121-1.json:  "schannel": "defaults",

@epruesse
Copy link
Member

@bioconda/core I'm not very familiar with the way the quay docker images are built. Shouldn't conda-forge be preferred over defaults? The fastqc image contains the (broken, missing fonts) openjdk from defaults for some reason.

@rvalieris
Copy link
Member

in theory yes.
I think we could add a test to the package to check if the fonts are available.

@rvalieris
Copy link
Member

I just did a more realistically test here: #6576, and the recipe built just fine, however this test fails when I tried it with quay.io/biocontainers/fastqc.
which implies during this build and test it is using conda-forge::openjdk as intended. however the quay container ends up with the defaults::openjdk.

I also checked containers of other bioconda packages picard, gatk, cromwell and they also contain defaults::openjdk.

to be honest I am not sure where the issue is, I am not familiar with how the quay images are built either.

@bgruening
Copy link
Member

@epruesse @rvalieris the container that is build during testing is push directly. So it should be the test container. I need some time to look at it and run it locally, but if you run it with debug, the mulled-build command and/or the involucro command should have the channel order printed. You should also see the packages and the channels in this log.

@epruesse
Copy link
Member

epruesse commented Nov 1, 2017

@bgruening I believe the defaults channel is active in the mulled builds: https://github.com/bioconda/bioconda-utils/blob/master/bioconda_utils/pkg_test.py#L80

W.r.t. bioconda-utils and the mulled-build ... I just tried to have a look at it, but the jumping about between various tools makes it hard to figure out what's going on at all, even with --loglevel=debug. It's not working at all with simulate-travis.py and ~/.bioconda for me (I get Can't convert NoneType to str implicitly type Python errors).

Where should the image file end up even?

@bgruening
Copy link
Member

Defaults should be in the list, but with the lowest priority. The image will end up in the Docker image registry. It is calles quay.io/biocontainers/tool_name:version ... this image is then simply pushed if all tests succeed. On your host it will be in the list of docker images.

@epruesse
Copy link
Member

epruesse commented Nov 1, 2017

Checked that already ... nothing there. I'll post if I find the time to dig into this.

@MWorksGH
Copy link

MWorksGH commented Jan 6, 2018

Using quay.io/biocontainers/fastqc:0.11.6--pl5.22.0_0 and the error persists, hope someone can get some time to solve this. :)

@bgruening
Copy link
Member

@MWorksGH could you share the entire installation plan with us? Please make sure you are using the correct channel order: https://bioconda.github.io/#set-up-channels

@raonyguimaraes
Copy link
Contributor

raonyguimaraes commented Feb 17, 2018

Solved this problem on Ubuntu using: sudo apt install ttf-dejavu
Hope this gets sorted at some point.

@Tintest
Copy link

Tintest commented Feb 23, 2018

I'm afraid the fastqc 0.11.7--pl5.22.0_0 container suffer from the same problem.

@ewels
Copy link
Member

ewels commented Mar 11, 2018

@bgruening - here's a minimal example Dockerfile:

FROM continuumio/miniconda
MAINTAINER Phil Ewels <[email protected]>

RUN conda config --add channels defaults \
 && conda config --add channels conda-forge \
 && conda config --add channels bioconda \
 && conda install -y fastqc=0.11.7

Building:

Click to expand log
docker build . -t fastqc_test
Sending build context to Docker daemon  133.2MB
Step 1/3 : FROM continuumio/miniconda
latest: Pulling from continuumio/miniconda
4176fe04cefe: Pull complete
3727fa417d9f: Pull complete
30fd03596c22: Pull complete
8d7f8695c318: Pull complete
Digest: sha256:c93288b9bb35847e575d5ee8f3469551d6c769812bed2ed59968af86897b0791
Status: Downloaded newer image for continuumio/miniconda:latest
 ---> 53447bc91028
Step 2/3 : MAINTAINER Phil Ewels <[email protected]>
 ---> Running in 43967e10080f
Removing intermediate container 43967e10080f
 ---> 3fd3b0a9c1eb
Step 3/3 : RUN conda config --add channels defaults  && conda config --add channels conda-forge  && conda config --add channels bioconda  && conda install -y fastqc=0.11.7
 ---> Running in 6cbdbc89ded1
Warning: 'defaults' already in 'channels' list, moving to the top
Solving environment: ...working... done


==> WARNING: A newer version of conda exists. <==
  current version: 4.4.10
  latest version: 4.4.11

Please update conda by running

    $ conda update -n base conda


font-ttf-dejavu-sans-mono 2.37: ########## | 100%
perl 5.22.0.1: ########## | 100%
fastqc 0.11.7: ########## | 100%
openjdk 8.0.121: ########## | 100%

## Package Plan ##

  environment location: /opt/conda

  added / updated specs:
    - fastqc=0.11.7


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    font-ttf-dejavu-sans-mono-2.37|       h6964260_0         386 KB
    perl-5.22.0.1              |                0        15.1 MB  conda-forge
    fastqc-0.11.7              |       pl5.22.0_0         9.6 MB  bioconda
    openjdk-8.0.121            |                1        64.2 MB
    ------------------------------------------------------------
                                           Total:        89.3 MB

The following NEW packages will be INSTALLED:

    fastqc:                    0.11.7-pl5.22.0_0 bioconda
    font-ttf-dejavu-sans-mono: 2.37-h6964260_0
    openjdk:                   8.0.121-1
    perl:                      5.22.0.1-0        conda-forge


Downloading and Extracting Packages
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Removing intermediate container 6cbdbc89ded1
 ---> c3cf11270f71
Successfully built c3cf11270f71
Successfully tagged fastqc_test:latest

Then running a test:

$ docker container run -it fastqc_test bash
Click to expand log
# [ pasted mini fastq file ]

root@39ea321534b8:/# fastqc test.fq
Started analysis of test.fq
Analysis complete for test.fq
Exception in thread "Thread-1" java.lang.Error: Probable fatal error:No fonts found.
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1236)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1100)
	at sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:1037)
	at sun.font.SunFontManager.findDeferredFont(SunFontManager.java:1054)
	at sun.font.SunFontManager.findFont2D(SunFontManager.java:2256)
	at sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1220)
	at sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:1106)
	at sun.font.CompositeFont.doDeferredInitialisation(CompositeFont.java:263)
	at sun.font.CompositeFont.getSlotFont(CompositeFont.java:352)
	at sun.font.CompositeStrike.getStrikeForSlot(CompositeStrike.java:78)
	at sun.font.CompositeStrike.getFontMetrics(CompositeStrike.java:93)
	at sun.font.FontDesignMetrics.initMatrixAndMetrics(FontDesignMetrics.java:359)
	at sun.font.FontDesignMetrics.<init>(FontDesignMetrics.java:350)
	at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:302)
	at sun.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:855)
	at uk.ac.babraham.FastQC.Graphs.QualityBoxPlot.paint(QualityBoxPlot.java:88)
	at javax.swing.JComponent.print(JComponent.java:1202)
	at uk.ac.babraham.FastQC.Modules.AbstractQCModule.writeDefaultImage(AbstractQCModule.java:68)
	at uk.ac.babraham.FastQC.Modules.PerBaseQualityScores.makeReport(PerBaseQualityScores.java:199)
	at uk.ac.babraham.FastQC.Report.HTMLReportArchive.<init>(HTMLReportArchive.java:131)
	at uk.ac.babraham.FastQC.Analysis.OfflineRunner.analysisComplete(OfflineRunner.java:178)
	at uk.ac.babraham.FastQC.Analysis.AnalysisRunner.run(AnalysisRunner.java:110)
	at java.lang.Thread.run(Thread.java:745)

root@39ea321534b8:/#

So the channel order should be correct I think, but I'm still getting the error.

Note - that if I explicitly add conda-forge::openjdk to the Dockerfile conda install command, everything is fine:

FROM continuumio/miniconda
MAINTAINER Phil Ewels <[email protected]>

RUN conda config --add channels defaults \
 && conda config --add channels conda-forge \
 && conda config --add channels bioconda \
 && conda install -y conda-forge::openjdk fastqc=0.11.7
Click to expand log
$ docker build . -t fastqc_test_2

Sending build context to Docker daemon  133.2MB
Step 1/3 : FROM continuumio/miniconda
 ---> 53447bc91028
Step 2/3 : MAINTAINER Phil Ewels <[email protected]>
 ---> Using cache
 ---> 3fd3b0a9c1eb
Step 3/3 : RUN conda config --add channels defaults  && conda config --add channels conda-forge  && conda config --add channels bioconda  && conda install -y conda-forge::openjdk fastqc=0.11.7
 ---> Running in bb556e1cccc6
Warning: 'defaults' already in 'channels' list, moving to the top
Solving environment: ...working... done


==> WARNING: A newer version of conda exists. <==
  current version: 4.4.10
  latest version: 4.4.11

Please update conda by running

    $ conda update -n base conda


openjdk 8.0.144: ########## | 100%
font-ttf-dejavu-sans-mono 2.37: ########## | 100%
perl 5.22.0.1: ########## | 100%
fastqc 0.11.7: ########## | 100%

## Package Plan ##

  environment location: /opt/conda

  added / updated specs:
    - conda-forge::openjdk
    - fastqc=0.11.7


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    openjdk-8.0.144            |   zulu8.23.0.3_1        69.3 MB  conda-forge
    font-ttf-dejavu-sans-mono-2.37|       h6964260_0         386 KB
    perl-5.22.0.1              |                0        15.1 MB  conda-forge
    fastqc-0.11.7              |       pl5.22.0_0         9.6 MB  bioconda
    ------------------------------------------------------------
                                           Total:        94.4 MB

The following NEW packages will be INSTALLED:

    fastqc:                    0.11.7-pl5.22.0_0      bioconda
    font-ttf-dejavu-sans-mono: 2.37-h6964260_0
    openjdk:                   8.0.144-zulu8.23.0.3_1 conda-forge
    perl:                      5.22.0.1-0             conda-forge


Downloading and Extracting Packages
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
Removing intermediate container bb556e1cccc6
 ---> d8a0723e043e
Successfully built d8a0723e043e
Successfully tagged fastqc_test_2:latest
$ docker container run -it fastqc_test bash
# [ pasted mini fastq file ]

root@15a71d6a5e95:/# fastqc test.fq
Started analysis of test.fq
Analysis complete for test.fq
root@15a71d6a5e95:/#

So it seems that this can be fixed fairly easily by explicitly requiring the conda-forge version of openjdk. Could this be added to the bioconda FastQC recipe or something?

@bgruening
Copy link
Member

Hopefully done.

bgruening pushed a commit that referenced this issue Jun 29, 2018
* bl

* bl

* remove strange smatools version

* remove old smatools version

* rebase

* fix samtools

* add new package to blacklist

* fix prophyle

* using cxx instead of c

* add a few more to the blacklist

* fixes

* Fix rust-overlaps using the same fix from rust-bio-tools (#9670)

- Add comments to prosic in the blacklist (it's failing due to missing trait
  bounds)

* FastQC: Update the openjdk dependency. (#9675)

The "defaults" build was bumped, leading to the defaults version of
openjdk be installed, instead of the conda-forge one.  See #5026.
To prevent the next build bump causing this issue again, increment
the minimum version by one.

* Update secimtools recipe to prevent scipy upgrade to 1.x (#9676)

* Update secimtools recipe to prevent scipy upgrade to 1.x

* Add a noarch section for secimtools per circleci linter error

* fix slang download source (#9672)

* fix slang download source

* fix lint

* fix checksum

* Incrementing to Anvio 5.1.  (#9680)

* Incrementing to Anvio 5.1. Updating pysam dependency to reflect new requirements

* fixing sha value

* Add missing licenses (#9677)

* add license to 2pg_cartesian

* fix typo

* add licenses

* fix nanopolish

* remove nanopolish from blacklist

* auto-generated hashes without bump
@mbargull
Copy link
Member

thanks!

@cbrueffer
Copy link
Member

Still happening, although the fonts are being installed now. The version being installed is 0.11.7-pl5.22.0_0 , do all the -pl5.22.0 versions of the packages need to be invalidated?

$ conda create -n foo fastqc
Solving environment: done

## Package Plan ##

  environment location: /home/chris/miniconda3/envs/foo

  added / updated specs: 
    - fastqc


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    font-ttf-dejavu-sans-mono-2.37|       h6964260_0         386 KB
    fastqc-0.11.7              |       pl5.22.0_0         9.6 MB  bioconda
    ------------------------------------------------------------
                                           Total:        10.0 MB

The following NEW packages will be INSTALLED:

    fastqc:                    0.11.7-pl5.22.0_0 bioconda   
    font-ttf-dejavu-sans-mono: 2.37-h6964260_0              
    openjdk:                   8.0.121-1                    
    perl:                      5.22.0.1-0        conda-forge

@cbrueffer cbrueffer reopened this Jun 30, 2018
@mbargull
Copy link
Member

Yes, that's to be expected. Is there any reason why defaults::openjdk=8.0.121_1 + font-ttf-dejavu-sans-mono=2.37=h6964260_0 wouldn't work? I'm always hesitant to call something broken (meaning, labelling bioconda::fastqc=0.11.7=pl5.22.0_0 as broken) if it isn't necessarily.

druvus pushed a commit that referenced this issue Jun 30, 2018
* bl

* bl

* remove strange smatools version

* remove old smatools version

* rebase

* fix samtools

* add new package to blacklist

* fix prophyle

* using cxx instead of c

* add a few more to the blacklist

* fixes

* Fix rust-overlaps using the same fix from rust-bio-tools (#9670)

- Add comments to prosic in the blacklist (it's failing due to missing trait
  bounds)

* FastQC: Update the openjdk dependency. (#9675)

The "defaults" build was bumped, leading to the defaults version of
openjdk be installed, instead of the conda-forge one.  See #5026.
To prevent the next build bump causing this issue again, increment
the minimum version by one.

* Update secimtools recipe to prevent scipy upgrade to 1.x (#9676)

* Update secimtools recipe to prevent scipy upgrade to 1.x

* Add a noarch section for secimtools per circleci linter error

* fix slang download source (#9672)

* fix slang download source

* fix lint

* fix checksum

* Incrementing to Anvio 5.1.  (#9680)

* Incrementing to Anvio 5.1. Updating pysam dependency to reflect new requirements

* fixing sha value

* Add missing licenses (#9677)

* add license to 2pg_cartesian

* fix typo

* add licenses

* fix nanopolish

* remove nanopolish from blacklist

* auto-generated hashes without bump

* fix ea-utils

* fix wgsim

* bump build

* add libgcc dep

* Update meta.yaml

* Update meta.yaml
@cbrueffer
Copy link
Member

I can't think of any reason for why it shouldn't work. FYI, I tried the bioconda::fastqc=0.11.7=4 package resulting from my fastqc commit yesterday and it works.

@apeltzer
Copy link
Member

Ok, still having some issues here. I first thought that the channels order was causing this, but thats not the case:

Here's my environment.yaml and I create the environment like this:

https://github.com/nf-core/eager/blob/dev/environment.yml

conda env create -f environment.yml

Unfortunately, when calling fastqc in there, I reproducibly get this error:

fastqc                                                                                                                                                          (nf-core-eager-2.1.0dev) 
java: symbol lookup error: /home/alex/.conda/envs/nf-core-eager-2.1.0dev/bin/../lib/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var

cf nf-core/eager#67

@apeltzer
Copy link
Member

Adding the above mentioned ttf package didn't help either unfortunately...

@bgruening
Copy link
Member

From where is your openjdk coming, from which channel?

@apeltzer
Copy link
Member

apeltzer commented Oct 24, 2018

conda list says conda-forge:

openjdk                   8.0.144          zulu8.23.0.3_2    conda-forge

@apeltzer
Copy link
Member

cf nf-core/rnaseq#113

@apeltzer
Copy link
Member

Couldn't find a solution for this atm, quite clueless what is the issue here...

@stevekm
Copy link

stevekm commented Nov 12, 2018

When I try to use the method suggested by @raonyguimaraes I get an error under Ubuntu 16.04:

Package ttf-dejavu is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  fonts-dejavu-extra fonts-dejavu-core

E: Package 'ttf-dejavu' has no installation candidate

maybe this is a recent change because I think I have a Dockerfile from this past May where this appeared to have worked..

@jvolkening
Copy link
Contributor

Just want to add that I ran into this problem today, and it doesn't appear to matter where the openjdk package comes from (for me). Running on the vanilla AWS AMI image and within the continuumio/miniconda3 docker image, fastqc doesn't work unless both the fontconfig and at least one font-ttf-* package is installed. Interestingly, the font package can then be removed and fastqc will continue to work.

# Name                    Version                   Build  Channel
fastqc                    0.11.8                        0    bioconda
openjdk                   11.0.1               h470a237_2    conda-forge
fontconfig                2.13.1               h65d0f4c_0    conda-forge

@jvolkening
Copy link
Contributor

jvolkening commented Nov 29, 2018

Interestingly, the font package can then be removed and fastqc will continue to work.

To clarify this, FastQC doesn't seem to need the fonts themselves to be present, just the entries in the fontconfig cache. When fc-cache is run after font removal, the FastQC errors return.

@apeltzer
Copy link
Member

I will submit an updated recipe now that adds

- fontconfig > 2 
- font-ttf-dejavu-sans-mono > 2

To make sure this is solved. It keeps being annoying when this breaks from time to time, so adding these two should make everything more stable.

Lenbok added a commit to Lenbok/bioconda-recipes that referenced this issue Jan 23, 2019
Java image writing (which rtg rocplot uses to save ROC images) doesn't
work unless java has some minimal font requirements.

See also: bioconda#5026
Lenbok added a commit that referenced this issue Jan 28, 2019
* rtg-tools: update to 3.10.1

* Add requirement for zlib to test openjdk workaround.

In mulled test environment openjdk isn't pulling in zlib when it
should. Added explicit requirement to make tests work.

* Add minimal font requirements to permit image saving.

Java image writing (which rtg rocplot uses to save ROC images) doesn't
work unless java has some minimal font requirements.

See also: #5026
@bgruening
Copy link
Member

It seems no one complained anymore ... so closing this again. Fingers crossed thanks all!

@ialbert
Copy link
Member

ialbert commented Oct 7, 2019

I will note here that while fastqc runs, to my surprise the fonts in the generated output are unexpectedly ugly and unprofessionally looking, this was not the case last year.

the image looks like something generated in the 90s. (conda on a Mac)

image

@vinjana
Copy link
Contributor

vinjana commented Sep 8, 2021

For whoever gets across this with a Conda environment that is mounted into a container:

If the environment was build e.g. outside of the container, the paths in $CONDA_PREFIX/etc/fonts/font.conf will be those outside the container.

If you then run fastqc in the container and you encounter this error, probably the paths in the font.conf are not pointing to the path of this Conda env in the container.

@allysonFDSmtp
Copy link

allysonFDSmtp commented Dec 3, 2024

Hi everyone,
Looks like there is still a problem with Java because when I try to process a fastqc into my env conda I have this error :

Failed to process file sample1_R1_001.fastq.gz
  java.lang.RuntimeException: Fontconfig head is null, check your fonts or fonts configuration
        at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1263)
        at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:221)
        at java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:105)
        at java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:696)
        at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:352)
        at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:309)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
        at java.desktop/sun.font.SunFontManager.<init>(SunFontManager.java:309)
        at java.desktop/sun.awt.FcFontManager.<init>(FcFontManager.java:35)
        at java.desktop/sun.awt.X11FontManager.<init>(X11FontManager.java:55)
        at java.desktop/sun.font.PlatformFontInfo.createFontManager(PlatformFontInfo.java:37)
        at java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:51)
        at java.desktop/sun.font.SunFontManager.getInstance(SunFontManager.java:242)
        at java.desktop/sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:260)
        at java.desktop/sun.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:862)
        at uk.ac.babraham.FastQC.Graphs.QualityBoxPlot.paint(QualityBoxPlot.java:88)
        at java.desktop/javax.swing.JComponent.print(JComponent.java:1274)
        at uk.ac.babraham.FastQC.Modules.AbstractQCModule.writeDefaultImage(AbstractQCModule.java:68)
        at uk.ac.babraham.FastQC.Modules.PerBaseQualityScores.makeReport(PerBaseQualityScores.java:199)
        at uk.ac.babraham.FastQC.Report.HTMLReportArchive.<init>(HTMLReportArchive.java:131)
        at uk.ac.babraham.FastQC.Analysis.OfflineRunner.analysisComplete(OfflineRunner.java:178)
        at uk.ac.babraham.FastQC.Analysis.AnalysisRunner.run(AnalysisRunner.java:110)
        at java.base/java.lang.Thread.run(Thread.java:1583)

I have those library in my env conda

openjdk                   17.0.11              h24d6bf4_0    conda-forge
fastqc                    0.11.7               hdfd78af_7    bioconda
font-ttf-dejavu-sans-mono 2.37                 hab24e00_0    conda-forge
font-ttf-inconsolata      2.001                hcb22688_0  
font-ttf-source-code-pro  2.030                hd3eb1b0_0  
font-ttf-ubuntu           0.83                 h8b1ccd4_0  
fontconfig                2.14.2               h14ed4e7_0    conda-forge
fonts-anaconda            1                    h8fa9717_0  
fonts-conda-ecosystem     1                    hd3eb1b0_0

Thank you for your help

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

Successfully merging a pull request may close this issue.