hns - 日記自動生成システム - Version 2.19.9

先月 2013年05月 来月
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Namazu for hns による簡易全文検索
詳しくは 詳細指定/ヘルプを参照して下さい
検索式:

2013年05月09日(木) 旧暦 [n年日記] [更新:"2013/05/10 21:22:25"]

#1 [pkgsrc] cmake and RPATH

最近は、あちこちに、手を出して、収拾がつかなくなって来ていて、 と言いながら、いつものことではある訳だけれど。
todo の一覧がちっとも消化されなくて、大きくなる一方、とも言える。
それで気になっていることの一つは、 (...wip/trustedQSL)> cat -n ./work/tqsl-114/apps/cmake_install.cmake
  1  # Install script for directory: /usr/pkgsrc/wip/trustedQSL/work/tqsl-114/apps
  2
  3  # Set the install prefix
  4  IF(NOT DEFINED CMAKE_INSTALL_PREFIX)
  5    SET(CMAKE_INSTALL_PREFIX "/usr/pkg")
  6  ENDIF(NOT DEFINED CMAKE_INSTALL_PREFIX)
  7  STRING(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
  8
  9  # Set the install configuration name.
 10  IF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
 11    IF(BUILD_TYPE)
 12      STRING(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
 13             CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
 14    ELSE(BUILD_TYPE)
 15      SET(CMAKE_INSTALL_CONFIG_NAME "")
 16    ENDIF(BUILD_TYPE)
 17    MESSAGE(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
 18  ENDIF(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
 19
 20  # Set the component getting installed.
 21  IF(NOT CMAKE_INSTALL_COMPONENT)
 22    IF(COMPONENT)
 23      MESSAGE(STATUS "Install component: \"${COMPONENT}\"")
 24      SET(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
 25    ELSE(COMPONENT)
 26      SET(CMAKE_INSTALL_COMPONENT)
 27    ENDIF(COMPONENT)
 28  ENDIF(NOT CMAKE_INSTALL_COMPONENT)
 29
 30  IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
 31    IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tqsl" AND
 32       NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tqsl")
 33      FILE(RPATH_CHECK
 34           FILE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tqsl"
 35           RPATH "/usr/pkg/lib:/usr/pkg/lib")
 36    ENDIF()
 37    FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" 
	  TYPE EXECUTABLE FILES "/usr/pkgsrc/wip/trustedQSL/work/tqsl-114/apps/tqsl")
 38    IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tqsl" AND
 39       NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tqsl")
 40      FILE(RPATH_CHANGE
 41           FILE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tqsl"
 42           OLD_RPATH "/usr/pkg/lib:/usr/pkgsrc/wip/trustedQSL/work/tqsl-114/src"
 43           NEW_RPATH "/usr/pkg/lib:/usr/pkg/lib")
 44      IF(CMAKE_INSTALL_DO_STRIP)
 45        EXECUTE_PROCESS(COMMAND "/usr/pkgsrc/wip/trustedQSL/work/.tools/bin/strip" 
	"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tqsl")
 46      ENDIF(CMAKE_INSTALL_DO_STRIP)
 47    ENDIF()
 48  ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
 49
 50  IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
 51    IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tqslcert" AND
 52       NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tqslcert")
 53      FILE(RPATH_CHECK
 54           FILE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tqslcert"
 55           RPATH "/usr/pkg/lib:/usr/pkg/lib")
 56    ENDIF()
 57    FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" 
	TYPE EXECUTABLE FILES "/usr/pkgsrc/wip/trustedQSL/work/tqsl-114/apps/tqslcert")
 58    IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tqslcert" AND
 59       NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tqslcert")
 60      FILE(RPATH_CHANGE
 61           FILE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tqslcert"
 62           OLD_RPATH "/usr/pkg/lib:/usr/pkgsrc/wip/trustedQSL/work/tqsl-114/src"
 63           NEW_RPATH "/usr/pkg/lib:/usr/pkg/lib")
 64      IF(CMAKE_INSTALL_DO_STRIP)
 65        EXECUTE_PROCESS(COMMAND "/usr/pkgsrc/wip/trustedQSL/work/.tools/bin/strip" 
	"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/tqslcert")
 66      ENDIF(CMAKE_INSTALL_DO_STRIP)
 67    ENDIF()
 68  ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
 69
 70  IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
 71    FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/TrustedQSL" 
	TYPE DIRECTORY FILES "/usr/pkgsrc/wip/trustedQSL/work/tqsl-114/apps/help")
 72  ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
 73
 74  IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
 75    FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/man/man5" 
	TYPE FILE FILES "/usr/pkgsrc/wip/trustedQSL/work/tqsl-114/apps/trustedqsl.5")
 76  ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
 77
wip/trustedQSL の cmake の処理の 中で RPATH_CHANGE の OLD_RPATH の順が、 変更しようとしている譜に設定されているものと逆になっているのは何故か、というのがある
きょうは cmake を見ていて、この辺が関係あるのかなということになった。
cat -n work/cmake-2.8.10/Source/cmLocalGenerator.cxx | sed -n 1650,1669p
1661  /**
1662   * Output the linking rules on a command line.  For executables,
1663   * targetLibrary should be a NULL pointer.  For libraries, it should point
1664   * to the name of the library.  This will not link a library against itself.
1665   */
1666  void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
1667                                             std::string& frameworkPath,
1668                                             std::string& linkPath,
1669                                             cmGeneratorTarget &tgt,
1670                                             bool relink)
1671 {

% cat -n work/cmake-2.8.10/Source/cmLocalGenerator.cxx | sed -n 1740,1789p
1740    fout << linkLibs;
1741
1742    // Get the RPATH entries.
1743    std::vector<std::string> runtimeDirs;
1744    cli.GetRPath(runtimeDirs, relink);
1745
1746    // Check what kind of rpath flags to use.
1747    if(cli.GetRuntimeSep().empty())
1748      {
1749      // Each rpath entry gets its own option ("-R a -R b -R c")
1750      std::string rpath;
1751      for(std::vector<std::string>::iterator ri = runtimeDirs.begin();
1752          ri != runtimeDirs.end(); ++ri)
1753        {
1754        rpath += cli.GetRuntimeFlag();
1755        rpath += this->Convert(ri->c_str(), NONE, SHELL, false);
1756        rpath += " ";
1757        }
1758      fout << rpath;
1759      }
1760    else
1761      {
1762      // All rpath entries are combined ("-Wl,-rpath,a:b:c").
1763     std::string rpath = cli.GetRPathString(relink);
1764
1765      // Store the rpath option in the stream.
1766      if(!rpath.empty())
1767        {
1768        fout << cli.GetRuntimeFlag();
1769        fout << this->EscapeForShell(rpath.c_str(), true);
1770        fout << " ";
1771        }
1772      }
1773
1774    // Add the linker runtime search path if any.
1775    std::string rpath_link = cli.GetRPathLinkString();
1776    if(!cli.GetRPathLinkFlag().empty() && !rpath_link.empty())
1777      {
1778      fout << cli.GetRPathLinkFlag();
1779      fout << this->EscapeForShell(rpath_link.c_str(), true);
1780      fout << " ";
1781      }
1782
1783    // Add standard libraries for this language.
1784    std::string standardLibsVar = "CMAKE_";
1785    standardLibsVar += cli.GetLinkLanguage();
1786    standardLibsVar += "_STANDARD_LIBRARIES";
1787    if(const char* stdLibs =
1788       this->Makefile->GetDefinition(standardLibsVar.c_str()))
1789      {
cat -n ./work/cmake-2.8.10/Source/cmComputeLinkInformation.cxx | sed -n 437,459p
 437  std::string cmComputeLinkInformation::GetRPathLinkString()
 438  {
 439    // If there is no separate linker runtime search flag (-rpath-link)
 440    // there is no reason to compute a string.
 441    if(!this->OrderDependentRPath)
 442      {
 443      return "";
 444      }
 445
 446    // Construct the linker runtime search path.
 447    std::string rpath_link;
 448    const char* sep = "";
 449    std::vector<std::string> const& dirs =
 450      this->OrderDependentRPath->GetOrderedDirectories();
 451    for(std::vector<std::string>::const_iterator di = dirs.begin();
 452        di != dirs.end(); ++di)
 453      {
 454      rpath_link += sep;
 455      sep = ":";
 456      rpath_link += *di;
 457      }
 458    return rpath_link;
 459  }

#2 [pkgsrc] ham/fldigi-3.21.70

Audio -> Devices -> OSS   に /dev/audio1 と書いておくと、
音が出せる
E: void trx_trx_receive_loop(): Sound error: Invalid argument
E: void trx_trx_receive_loop(): Sound error: Invalid argument
こういうのは沢山見えるけれど(受信側かな)。

audioplay を試して見る:

上に関連した話題で、
which audioplay 
/usr/bin/audioplay
となっていて、May 9 22:43:10 modena /netbsd: の後に次のような文字列がある時に、
uaudio0 at uhub1 port 7 configuration 1 interface 0
uaudio0: C-Media Electronics Inc. C-Media USB Headphone Set, rev 1.10/1.00, addr 5
uaudio0: audio rev 1.00
audio1 at uaudio0: full duplex, playback, capture, independent
uhidev3 at uhub1 port 7 configuration 1 interface 3
uhidev3: C-Media Electronics Inc. C-Media USB Headphone Set, rev 1.10/1.00, addr 5, iclass 3/0
uhid0 at uhidev3: input=4, output=4, feature=0
またaudio.wav という譜があって、次のような属性のものだったとして
% file audio.wav 
audio.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz
次のようにすると、音が出る
audioplay -v 3  -d /dev/audio1 audio.wav
ただし、上で -v 3 としている部分は効かない。 似た話は 2005/09/15 に書いていた。(ちなみに上に書いたのは、同じ USB audio の箱である)
(僕には)不思議なことに上では -d としているが 8 年前の日記 (macppc) では -f としていた。 それで今 -f とすると、
modena@makoto 21:13:40/130510(~)%  audioplay -v 3  -f /dev/audio1 audio.wav
audioplay: could not open /dev/audio1: Invalid argument
audioplay: audio device write failed: Input/output error
となる。fldigi の問題表示と似ている。



最近の日記
2024年05月08日
comparison on ./buildsh tools
2024年05月06日
py-setuptools (python 3.11.9)
make release took 1 hours and 10 min
qemu invocation for 10.99.10
2024年05月05日
Windows 10 version
serial connection
bc bench
2024年05月04日
Trial on 10.99.10
another version (later trial) to succeed
2024年04月29日
dkim
以上、1 日分です。
タイトル一覧
カテゴリ分類
Powered by hns-2.19.9, HyperNikkiSystem Project

Count.cgi (since 2000/02/05)