Bug 175356 - graphics/libosmesa: NameError: name 'ws_dri' is not defined:
Summary: graphics/libosmesa: NameError: name 'ws_dri' is not defined:
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pietro Cerutti
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-16 16:30 UTC by O. Hartmann
Modified: 2013-01-28 08:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2013-01-16 16:30:00 UTC
The update of port graphics/libosmesa on freeBSD 10.0-CURRENT fails with the below shown error message.

The system uses in /etc/make.conf the following X11 related flags to build new X11-software in favour of the old versions:

# New Xorg and Mesa
WITH_NEW_XORG=          YES
WITH_KMS=               YES


The build fails at the initial phase with the following error:

[...]
Mkdir("build/freebsd")
warning: gcc 4.2.x optimizer is broken -- disabling optimizations
Checking for X11 (x11 xext xdamage xfixes)... yes
Checking for XCB (x11-xcb xcb-glx >= 1.8.1)... no
Checking for XF86VIDMODE (xxf86vm)... yes
Checking for DRM (libdrm >= 2.4.24)... yes
Checking for DRM_INTEL (libdrm_intel >= 2.4.30)... yes
Checking for DRM_RADEON (libdrm_radeon >= 2.4.31)... yes
Checking for XORG (xorg-server >= 1.6.0)... yes
Checking for KMS (libkms >= 2.4.24)... no
Checking for UDEV (libudev > 150)... no
fatal: Not a git repository (or any parent up to mount point /usr/ports)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Checking for C header file X11/extensions/dpmsconst.h... yes
NameError: name 'ws_dri' is not defined:
  File "/usr/ports/graphics/libosmesa/work/Mesa-9.0.1/SConstruct", line 144:
    duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 614:
    return method(*args, **kw)
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 551:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File "/usr/ports/graphics/libosmesa/work/Mesa-9.0.1/src/SConscript", line 34:
    SConscript('gallium/SConscript')
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 614:
    return method(*args, **kw)
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 551:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File "/usr/ports/graphics/libosmesa/work/Mesa-9.0.1/src/gallium/SConscript", line 148:
    'targets/dri-vmwgfx/SConscript',
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 614:
    return method(*args, **kw)
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 551:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File "/usr/ports/graphics/libosmesa/work/Mesa-9.0.1/src/gallium/targets/dri-swrast/SConscript", line 11:
    ws_dri,
*** [do-build] Error code 2

Stop in /usr/ports/graphics/libosmesa.

===>>> make failed for graphics/libosmesa
===>>> Aborting update

How-To-Repeat: Update port graphics/libosmesa. The update fails on systems FreeBSD 10 and FreeBSD 9.1-STABLE with new Xorg set (having those flags NOT set is not tested since we do not have such systems anymore).
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-01-16 16:30:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gahr

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Pietro Cerutti freebsd_committer freebsd_triage 2013-01-24 12:33:07 UTC
I just committed an update to libosmesa 9.0.2. Would you please check
whether it solves the problem?

-- 
Pietro Cerutti
The FreeBSD Project
gahr@FreeBSD.org

PGP Public Key:
http://gahr.ch/pgp
Comment 3 Pietro Cerutti freebsd_committer freebsd_triage 2013-01-24 12:46:40 UTC
State Changed
From-To: open->feedback

Ask for submitter approval.
Comment 4 O. Hartmann 2013-01-24 13:26:46 UTC
On 01/24/13 13:33, Pietro Cerutti wrote:
> I just committed an update to libosmesa 9.0.2. Would you please check
> whether it solves the problem?
> 



Hello.

Sorry, no, it doesn't work (on my FreeBSD 10.0-CURRENT/amd64 boxes).

On one system, fresh install, I tried this also (make buildworld on all
system as of today ( FreeBSD 10.0-CURRENT #0 r245876: Thu Jan 24
11:54:54 CET 2013), the ports are also up to date and I recompiled xorg
and siblings via portmaster -f xorg these days.

The error that occurs on that machines is as follows and quite similar
to the reported one.


By the way, as reported, I see the same misbehaviour of a recent FreeBSD
9.1-STABLE box which has CLANG 3.2 compiled buildworld.

The problem also remains when trying to compile the port with USE_GCC=4.6+.

Regards,
Oliver

[...]
Checking for KMS (libkms >= 2.4.24)... no
Checking for UDEV (libudev > 150)... no
warning: LLVM disabled: not building llvmpipe
Checking for C header file X11/extensions/dpmsconst.h... yes
NameError: name 'ws_dri' is not defined:
  File "/usr/ports/graphics/libosmesa/work/Mesa-9.0.2/SConstruct", line 144:
    duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 614:
    return method(*args, **kw)
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 551:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File "/usr/ports/graphics/libosmesa/work/Mesa-9.0.2/src/SConscript",
line 34:
    SConscript('gallium/SConscript')
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 614:
    return method(*args, **kw)
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 551:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File
"/usr/ports/graphics/libosmesa/work/Mesa-9.0.2/src/gallium/SConscript",
line 148:
    'targets/dri-vmwgfx/SConscript',
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 614:
    return method(*args, **kw)
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 551:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/usr/local/lib/scons-2.1.0/SCons/Script/SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File
"/usr/ports/graphics/libosmesa/work/Mesa-9.0.2/src/gallium/targets/dri-swrast/SConscript",
line 11:
    ws_dri,
*** [do-build] Error code 2

Stop in /usr/ports/graphics/libosmesa.

Comment 5 Pietro Cerutti freebsd_committer freebsd_triage 2013-01-24 13:47:59 UTC
I see.. the problem seems to be due to using NEW_XORG. Unfortunately I
don't have a machine to build the new xorg on at the moment.

Would you be willing to grant me ssh access to that box?

-- 
Pietro Cerutti
The FreeBSD Project
gahr@FreeBSD.org

PGP Public Key:
http://gahr.ch/pgp
Comment 6 O. Hartmann 2013-01-25 09:53:21 UTC
On 01/25/13 10:37, Pietro Cerutti wrote:
> Hello Oliver,
> 
> would you mind trying to apply this patch?
> 



Patch applied and it seems the boxes can build the port. But I realize
another issue.
While on FreeBSD 10.0-CURRENT CLANG is now the deafult compiler and the
C++ compiler is referenced as g++ - the port uses g++ compiler
correctly, but then it seems to use hardcoded gcc in portions of the
sources, where the C compiler is involved, below a portion of the
console output.

gcc is on FreeBSD 10.0-CURRENT boxes the legacy GNU GCC C compiler, as
far as I know and this is not desired I guess.


[...]
g++ -o build/freebsd/glsl/builtin_compiler
build/freebsd/glsl/standalone_scaffolding.o build/freebsd/glsl/main.o
build/freebsd/glsl/hash_table.o build/freebsd/glsl/symbol_table.o
build/freebsd/glsl/glcpp/glcpp-lex.o
build/freebsd/glsl/glcpp/glcpp-parse.o build/freebsd/glsl/glsl_lexer.o
build/freebsd/glsl/glsl_parser.o build/freebsd/glsl/glcpp/pp.o
build/freebsd/glsl/strtod.o build/freebsd/glsl/ralloc.o
build/freebsd/glsl/ast_expr.o build/freebsd/glsl/ast_function.o
build/freebsd/glsl/ast_to_hir.o build/freebsd/glsl/ast_type.o
build/freebsd/glsl/builtin_variables.o
build/freebsd/glsl/glsl_parser_extras.o build/freebsd/glsl/glsl_types.o
build/freebsd/glsl/glsl_symbol_table.o
build/freebsd/glsl/hir_field_selection.o
build/freebsd/glsl/ir_basic_block.o build/freebsd/glsl/ir_builder.o
build/freebsd/glsl/ir_clone.o
build/freebsd/glsl/ir_constant_expression.o build/freebsd/glsl/ir.o
build/freebsd/glsl/ir_expression_flattening.o
build/freebsd/glsl/ir_function_can_inline.o
build/freebsd/glsl/ir_function_detect_recursion.o
build/freebsd/glsl/ir_function.o
build/freebsd/glsl/ir_hierarchical_visitor.o
build/freebsd/glsl/ir_hv_accept.o
build/freebsd/glsl/ir_import_prototypes.o
build/freebsd/glsl/ir_print_visitor.o build/freebsd/glsl/ir_reader.o
build/freebsd/glsl/ir_rvalue_visitor.o
build/freebsd/glsl/ir_set_program_inouts.o
build/freebsd/glsl/ir_validate.o
build/freebsd/glsl/ir_variable_refcount.o build/freebsd/glsl/linker.o
build/freebsd/glsl/link_functions.o build/freebsd/glsl/link_uniforms.o
build/freebsd/glsl/link_uniform_initializers.o
build/freebsd/glsl/loop_analysis.o build/freebsd/glsl/loop_controls.o
build/freebsd/glsl/loop_unroll.o
build/freebsd/glsl/lower_clip_distance.o
build/freebsd/glsl/lower_discard.o
build/freebsd/glsl/lower_discard_flow.o
build/freebsd/glsl/lower_if_to_cond_assign.o
build/freebsd/glsl/lower_instructions.o build/freebsd/glsl/lower_jumps.o
build/freebsd/glsl/lower_mat_op_to_vec.o
build/freebsd/glsl/lower_noise.o
build/freebsd/glsl/lower_texture_projection.o
build/freebsd/glsl/lower_variable_index_to_cond_assign.o
build/freebsd/glsl/lower_vec_index_to_cond_assign.o
build/freebsd/glsl/lower_vec_index_to_swizzle.o
build/freebsd/glsl/lower_vector.o
build/freebsd/glsl/lower_output_reads.o
build/freebsd/glsl/lower_ubo_reference.o
build/freebsd/glsl/opt_algebraic.o
build/freebsd/glsl/opt_array_splitting.o
build/freebsd/glsl/opt_constant_folding.o
build/freebsd/glsl/opt_constant_propagation.o
build/freebsd/glsl/opt_constant_variable.o
build/freebsd/glsl/opt_copy_propagation.o
build/freebsd/glsl/opt_copy_propagation_elements.o
build/freebsd/glsl/opt_dead_code.o
build/freebsd/glsl/opt_dead_code_local.o
build/freebsd/glsl/opt_dead_functions.o
build/freebsd/glsl/opt_function_inlining.o
build/freebsd/glsl/opt_if_simplification.o
build/freebsd/glsl/opt_noop_swizzle.o
build/freebsd/glsl/opt_redundant_jumps.o
build/freebsd/glsl/opt_structure_splitting.o
build/freebsd/glsl/opt_swizzle_swizzle.o
build/freebsd/glsl/opt_tree_grafting.o build/freebsd/glsl/s_expression.o
build/freebsd/glsl/builtin_stubs.o -Wl,--start-group -lm -lpthread
-Wl,--end-group
ld/freebsd-x86_64/mesa -Ibuild/freebsd-x86_64/mesa/main -Isrc/mesa/main
src/mesa/vbo/vbo_save.c
gcc -o build/freebsd-x86_64/mesa/math/m_xform.os -c -Wmissing-prototypes
-std=gnu99 -Wdeclaration-after-statement -O0 -fno-builtin-memcmp
-fno-strict-aliasing -g -m64 -fvisibility=hidden -Wall -Wno-long-long
-fmessage-length=0 -Wpointer-arith -fPIC -DNDEBUG -DHAVE_PTHREAD
-DHAVE_POSIX_MEMALIGN -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING
-DHAVE_ALIAS -DFEATURE_GL=1 -DIN_DRI_DRIVER -DHAVE_DLOPEN=1
-DUSE_X86_64_ASM -Iinclude -Isrc/gallium/include -Isrc/gallium/auxiliary
-Isrc/gallium/drivers -Isrc/gallium/winsys -Isrc/mapi -Isrc/glsl
-Isrc/mesa -Ibuild/freebsd-x86_64/mesa -Isrc/mesa
-Ibuild/freebsd-x86_64/mesa -Ibuild/freebsd-x86_64/mesa/main
-Isrc/mesa/main src/mesa/math/m_xform.c
gcc -o build/freebsd-x86_64/mesa/tnl/t_vertex_sse.os -c
-Wmissing-prototypes -std=gnu99 -Wdeclaration-after-statement -O0
-fno-builtin-memcmp -fno-strict-aliasing -g -m64 -fvisibility=hidden
-Wall -Wno-long-long -fmessage-length=0 -Wpointer-arith -fPIC -DNDEBUG
-DHAVE_PTHREAD -DHAVE_POSIX_MEMALIGN -DGLX_DIRECT_RENDERING
-DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DFEATURE_GL=1 -DIN_DRI_DRIVER
-DHAVE_DLOPEN=1 -DUSE_X86_64_ASM -Iinclude -Isrc/gallium/include
-Isrc/gallium/auxiliary -Isrc/gallium/drivers -Isrc/gallium/winsys
-Isrc/mapi -Isrc/glsl -Isrc/mesa -Ibuild/freebsd-x86_64/mesa -Isrc/mesa
-Ibuild/freebsd-x86_64/mesa -Ibuild/freebsd-x86_64/mesa/main
-Isrc/mesa/main src/mesa/tnl/t_vertex_sse.c
gcc -o build/freebsd-x86_64/mesa/program/prog_print.os -c
-Wmissing-prototypes -std=gnu99 -Wdeclaration-after-statement -O0
-fno-builtin-memcmp -fno-strict-aliasing -g -m64 -fvisibility=hidden
-Wall -Wno-long-long -fmessage-length=0 -Wpointer-arith -fPIC -DNDEBUG
-DHAVE_PTHREAD -DHAVE_POSIX_MEMALIGN -DGLX_DIRECT_RENDERING
-DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DFEATURE_GL=1 -DIN_DRI_DRIVER
-DHAVE_DLOPEN=1 -DUSE_X86_64_ASM -Iinclude -Isrc/gallium/include
-Isrc/gallium/auxiliary -Isrc/gallium/drivers -Isrc/gallium/winsys
-Isrc/mapi -Isrc/glsl -Isrc/mesa -Ibuild/freebsd-x86_64/mesa -Isrc/mesa
-Ibuild/freebsd-x86_64/mesa -Ibuild/freebsd-x86_64/mesa/main
-Isrc/mesa/main src/mesa/program/prog_print.c
g++ -o build/freebsd/glsl/builtin_function.os -c -O0 -fno-builtin-memcmp
-fno-strict-aliasing -g -m64 -fvisibility=hidden -Wall -Wno-long-long
-fmessage-length=0 -Wpointer-arith -fPIC -DNDEBUG -DHAVE_PTHREAD
-DHAVE_POSIX_MEMALIGN -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING
-DHAVE_ALIAS -Iinclude -Isrc/mapi -Isrc/mesa -Isrc/glsl -Isrc/glsl/glcpp
-Iinclude -Isrc/groot@telesto: [Mesa-9.0.2] allium/include
-Isrc/gallium/auxiliary -Isrc/gallium/drivers -Isrc/gallium/winsys
-Ibuild/freebsd-x86_64/glsl -Isrc/glsl -Ibuild/usr/local/bin/python
src/glsl/builtins/tools/generate_builtins.py
build/freebsd/glsl/builtin_compiler >
build/freebsd/glsl/builtin_function.cpp
root@telesto: [Mesa-9.0.2] /freebsd-x86_64/glsl/glcpp -Isrc/glsl/glcpp
build/freebsd/glsl/builtin_function.cppgcc -o
build/freebsd-x86_64/mesa/main/atifragshader.os -c -Wmissing-prototypes
-std=gnu99 -Wdeclaration-after-statement -O0 -fno-builtin-memcmp
-fno-strict-aliasing -g -m64 -fvisibility=hidden -Wall -Wno-long-long
-fmessage-length=0 -Wpointer-arith -fPIC -DNDEBUG -DHAVE_PTHREAD
-DHAVE_POSIX_MEMALIGN -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING
-DHAVE_ALIAS -DFEATURE_GL=1 -DIN_DRI_DRIVER -DHAVE_DLOPEN=1
-DUSE_X86_64_ASM -Iinclude -Isrc/gallium/include -Isrc/gallium/auxiliary
-Isrc/gallium/drivers -Isrc/gallium/winsys -Isrc/mapi -Isrc/glsl
-Isrc/mesa -Ibuild/freebsd-x86_64/mesa -Isrc/mesa
-Ibuild/freebsd-x86_64/mesa -Ibuild/freebsd-x86_64/mesa/main
-Isrc/mesa/main src/mesa/main/atifragshader.c
[...]

Regards,
Oliver
Comment 7 dfilter service freebsd_committer freebsd_triage 2013-01-28 08:13:30 UTC
Author: gahr
Date: Mon Jan 28 08:13:22 2013
New Revision: 311101
URL: http://svnweb.freebsd.org/changeset/ports/311101

Log:
  - Fix build with NEW_XORG
  
  PR:		175356
  Submitted by:	"O. Hartmann" <ohartman@zedat.fu-berlin.de>
  Patch by:	ak

Added:
  head/graphics/libosmesa/files/patch-ws_dri.txt   (contents, props changed)

Added: head/graphics/libosmesa/files/patch-ws_dri.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/libosmesa/files/patch-ws_dri.txt	Mon Jan 28 08:13:22 2013	(r311101)
@@ -0,0 +1,10 @@
+Index: src/gallium/winsys/sw/dri/SConscript
+@@ -4,7 +4,7 @@
+ 
+ Import('*')
+ 
+-if env['platform'] in ('linux', 'sunos'):
++if env['platform'] in ('freebsd', 'linux', 'sunos'):
+ 
+     env = env.Clone()
+ 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 8 Pietro Cerutti freebsd_committer freebsd_triage 2013-01-28 08:14:16 UTC
State Changed
From-To: feedback->closed

The patch has been committed. I'll take care of respecting CC / CXX 
separately. Thanks!