Bug 201339 - [patch] unbreak math/scilab build with latest fop and on systems with clang
Summary: [patch] unbreak math/scilab build with latest fop and on systems with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Max Brazhnikov
URL:
Keywords: patch
: 201643 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-07-04 20:08 UTC by Don Lewis
Modified: 2015-07-23 13:29 UTC (History)
1 user (show)

See Also:


Attachments
patch to unbreak math/scilab build (4.45 KB, patch)
2015-07-04 20:08 UTC, Don Lewis
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Lewis freebsd_committer freebsd_triage 2015-07-04 20:08:37 UTC
Created attachment 158347 [details]
patch to unbreak math/scilab build

The upgrade of textproc/fop broke the scilab build because the API for FopFactory.newInstance() appears to have changed.

On FreeBSD machines without base gcc and clang as the base compiler, configure fails because it is unable to find /usr/include/omp.h.  Since clang does not support OpenMP, add --without-openmp to CONFIGURE_ARGS.
Comment 1 Max Brazhnikov freebsd_committer freebsd_triage 2015-07-17 07:30:07 UTC
*** Bug 201643 has been marked as a duplicate of this bug. ***
Comment 2 Max Brazhnikov freebsd_committer freebsd_triage 2015-07-17 12:59:42 UTC
(In reply to Don Lewis from comment #0)
> On FreeBSD machines without base gcc and clang as the base compiler,
> configure fails because it is unable to find /usr/include/omp.h.  Since
> clang does not support OpenMP, add --without-openmp to CONFIGURE_ARGS.

I've never seen this before and I can't reproduce this on recent 10-stable. Could you provide more info?
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-07-17 15:32:20 UTC
A commit references this bug:

Author: makc
Date: Fri Jul 17 15:32:06 UTC 2015
New revision: 392380
URL: https://svnweb.freebsd.org/changeset/ports/392380

Log:
  math/scilab:
  - Fix build after textproc/fop update

  PR:		201339
  Submitted by:	truckman

Changes:
  head/math/scilab/files/patch-fop2
Comment 4 Don Lewis freebsd_committer freebsd_triage 2015-07-20 17:55:49 UTC
(In reply to Max Brazhnikov from comment #2)

FreeBSD 10-stable still has libgomp.so and /usr/include/omp.h, but they have been removed from FreeBSD 11.

The build fails on FreeBSD 11 in the configure stage:

checking curses.h presence... yes
checking for curses.h... yes
checking for dlopen in -ldl... yes
checking for library containing pthread_join... none required
checking fftw3.h usability... yes
checking fftw3.h presence... yes
checking for fftw3.h... yes
checking for fftw_plan_dft_r2c in -lfftw3... yes
checking omp.h usability... no
checking omp.h presence... no
checking for omp.h... no
configure: error: Could not find omp.h
===>  Script "configure" failed unexpectedly.
Please report the problem to makc@FreeBSD.org [maintainer] and attach the
"/wrkdirs/usr/ports/math/scilab/work/scilab-5.5.0/config.log" including the
output of the failure of your make command. Also, it might be a good idea to
provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.
make: stopped in /usr/ports/math/scilab



Even on FreeBSD 10, the clang compiled code links to the gcc port runtime library because of the rpath stuff added to LDFLAGS because of USE_FORTRAN, so even though this builds, I'm not sure that it really works.

# ldd /usr/local/lib/scilab/libsciparallel.so
/usr/local/lib/scilab/libsciparallel.so:
	libgomp.so.1 => /usr/local/lib/gcc48/libgomp.so.1 (0x801608000)
	libncurses.so.8 => /lib/libncurses.so.8 (0x801816000)
	libc++.so.1 => /usr/lib/libc++.so.1 (0x801a63000)
	libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x801d22000)
	libm.so.5 => /lib/libm.so.5 (0x801f3e000)
	libc.so.7 => /lib/libc.so.7 (0x800821000)
	libgcc_s.so.1 => /usr/local/lib/gcc48/libgcc_s.so.1 (0x802167000)
	libthr.so.3 => /lib/libthr.so.3 (0x80237d000)
Comment 5 Max Brazhnikov freebsd_committer freebsd_triage 2015-07-22 16:59:22 UTC
(In reply to Don Lewis from comment #4)
> Even on FreeBSD 10, the clang compiled code links to the gcc port runtime
> library because of the rpath stuff added to LDFLAGS because of USE_FORTRAN,
> so even though this builds, I'm not sure that it really works.

Actually it works, so I'd like to leave it as is for now, but I'll look whether scilab can be built with libiomp instead of libgomp.
Comment 6 leventelist 2015-07-23 07:03:46 UTC
For me it still doesen't build. Let me say it builds, but the documentation doesn't.

[...]
-- Building documentation (en_US) --
LANG=C SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 ./bin/scilab-adv-cli -noatomsautoload -nb -nouserstartup -e "try xmltojar([],[],'en_US');catch disp(lasterror()); exit(-1);end;exit(0);"
A fatal error has been detected by Scilab.
Your instance will probably quit unexpectedly soon.
If a graphic feature has been used, this might be caused by the system graphic drivers.
Please try to update them and run this feature again.
You can report a bug on http://bugzilla.scilab.org/ with:
* a sample code which reproduces the issue
* the result of [a, b] = getdebuginfo()
* the following information:
[jive:82121] Signal: Segmentation fault (11)
[jive:82121] Signal code: Invalid permissions (2)
[jive:82121] Failing at address: 0x4006b4
 
Lev
Comment 7 Max Brazhnikov freebsd_committer freebsd_triage 2015-07-23 09:33:00 UTC
(In reply to leventelist from comment #6)
> For me it still doesen't build. Let me say it builds, but the documentation
> doesn't.

Lev, you have different problem,  see my reply to you in bug 201659
Comment 8 commit-hook freebsd_committer freebsd_triage 2015-07-23 13:27:08 UTC
A commit references this bug:

Author: makc
Date: Thu Jul 23 13:26:10 UTC 2015
New revision: 392721
URL: https://svnweb.freebsd.org/changeset/ports/392721

Log:
  math/scilab:
  - Add check for OpenMP support [1]
  - Add check for unsupported combination of options

  PR:		201339 [1]
  Submitted by:	truckman

Changes:
  head/math/scilab/Makefile
Comment 9 Max Brazhnikov freebsd_committer freebsd_triage 2015-07-23 13:29:46 UTC
Thanks for help, Don!