Bug 30355 - compilation fails because sm4_defs.h is missing
Summary: compilation fails because sm4_defs.h is missing
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
Depends on:
Reported: 2010-09-23 14:33 UTC by Martin Stolpe
Modified: 2010-10-12 14:16 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

mesa configure options (296 bytes, text/plain)
2010-09-24 03:39 UTC, Martin Stolpe

Description Martin Stolpe 2010-09-23 14:33:22 UTC
Here is the compiliation log:
In file included from src/sm4_analyze.cpp:29:0:
include/sm4.h:41:22: fatal error: sm4_defs.h: No such file or directory
compilation terminated.
make[5]: *** [src/sm4_analyze.o] Error 1
Comment 1 Luca Barbieri 2010-09-23 22:14:03 UTC
Should be fixed by bccd4eb824d32256dd0f9234df9ddf9ab5ed90fd.
Can you confirm whether current Git master compiles?
Comment 2 Martin Stolpe 2010-09-24 01:59:23 UTC
No, it doesn't compile. The reason is that there is no "sm4_defs.h" file in "mesa/src/gallium/state_trackers/d3d1x/d3d1xshader/include/".
Comment 3 Luca Barbieri 2010-09-24 02:09:22 UTC
Yes, but it should be automatically generated.

Are you perhaps compiling without /usr/bin/makedepend installed?

If so, installing the makedepend package should fix this.
I'll see whether to make it work without it, or add an hard dependency on it in Mesa.
Comment 4 Martin Stolpe 2010-09-24 02:36:22 UTC
makedepend was indeed missing. Learned something new today. ;-)

On wikipedia I read, that makedepend isn't really used anymore: "makedepend... has since become superseded by the dependency generation facilities of various compilers, and is now used primarily as a worst-case fallback, e.g. by depcomp and GNU Automake." I don't know any of this stuff but it would it be possible to replace this dependency. makedepend for example is not even in the official repositories of my distro (Archlinux, it's in AUR though).

Anyway the compiliation still fails:
g++ -march=native -mtune=native -O2 -g -mfpmath=sse -pipe -Wall -fvisibility=hidden -fno-strict-aliasing  -fPIC  -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_XCB -DGLX_USE_TLS -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_XCB_DRI2 -DHAVE_LIBUDEV -Wl,--hash-style=gnu -Wl,--as-needed tools/dxbc2tgsi.o -o tools/dxbc2tgsi -Wl,--start-group  libgd3d1x.a ../d3d1xshader/libd3d1xshader.a ../../../auxiliary/libgallium.a -ldl -Wl,--end-group
libgd3d1x.a(sm4_to_tgsi.o): In function `.L1072':
/home/martin/abs/2_xorg/5_-_mesa-full/src/mesa-build/src/gallium/state_trackers/d3d1x/gd3d1x/sm4_to_tgsi.cpp:818: undefined reference to `d3d_to_pipe_prim_type'
libgd3d1x.a(sm4_to_tgsi.o): In function `.L1071':
/home/martin/abs/2_xorg/5_-_mesa-full/src/mesa-build/src/gallium/state_trackers/d3d1x/gd3d1x/sm4_to_tgsi.cpp:821: undefined reference to `d3d_to_pipe_prim'
collect2: ld returned 1 exit status
make[5]: *** [tools/dxbc2tgsi] Error 1
Comment 5 Luca Barbieri 2010-09-24 03:01:02 UTC
Unfortunately, the Mesa build system still uses makedepend.
It would be a good idea to make it an hard dependency though, since it causes silent errors otherwise.

The link error should now be fixed: let me know if there are any other issues.
Comment 6 Martin Stolpe 2010-09-24 03:39:54 UTC
Created attachment 38928 [details]
mesa configure options

Now it compiles. Thank you!

The d3d1x state tracker is the only part of mesa which depends on makedepends with the configuration I currently use (see attachement). Perhaps it would be a good idea to make makedepends a hard dependency in case d3d1x state tracker is selected.
Comment 7 Martin Stolpe 2010-09-27 12:57:06 UTC
This bug is still open but I think it can be closed. Either a dev closes this bug or if there aren't any objections I'm going to close this bug.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.