Menu

#310 CMake build exports no XXX_64 functions

1.27.x
closed-fixed
nobody
None
5
2021-06-05
2021-05-29
No

Hi, i'm trying to update Vcpkg's mpg123 port.

mpg123 itself builds successfully, but i've got regression with libopenmpt (libmpg123 is dependency):

libopenmpt.lib(SampleFormatMP3.cpp.obj) : error LNK2019: unresolved external symbol mpg123_open_handle_64 referenced in function "public: bool __cdecl OpenMPT::CSoundFile::ReadMP3Sample(unsigned short,class OpenMPT::detail::FileReader<class OpenMPT::FileReaderTraitsStdStream> &,bool)" (?ReadMP3Sample@CSoundFile@OpenMPT@@QEAA_NGAEAV?$FileReader@VFileReaderTraitsStdStream@OpenMPT@@@detail@2@_N@Z)
libopenmpt.lib(SampleFormatMP3.cpp.obj) : error LNK2019: unresolved external symbol mpg123_length_64 referenced in function "public: bool __cdecl OpenMPT::CSoundFile::ReadMP3Sample(unsigned short,class OpenMPT::detail::FileReader<class OpenMPT::FileReaderTraitsStdStream> &,bool)" (?ReadMP3Sample@CSoundFile@OpenMPT@@QEAA_NGAEAV?$FileReader@VFileReaderTraitsStdStream@OpenMPT@@@detail@2@_N@Z)
libopenmpt.lib(SampleFormatMP3.cpp.obj) : error LNK2019: unresolved external symbol mpg123_replace_reader_handle_64 referenced in function "public: bool __cdecl OpenMPT::CSoundFile::ReadMP3Sample(unsigned short,class OpenMPT::detail::FileReader<class OpenMPT::FileReaderTraitsStdStream> &,bool)" (?ReadMP3Sample@CSoundFile@OpenMPT@@QEAA_NGAEAV?$FileReader@VFileReaderTraitsStdStream@OpenMPT@@@detail@2@_N@Z)

I guess the problem is large file handling, something is lost when porting Visual Studio solution to CMake project.

I've tried to build shared library manally (VS Code + CMakeTools + VS2019), here is result:

[main] Building folder: mpg123-1.27.0 libmpg123
[build] Starting build
[proc] Executing command: "c:/Program Files/CMake/bin/cmake.exe" --build d:/source/repos/mpg123-1.27.0/build --config Release --target libmpg123 -j 8 --
[build] [1/1 100% :: 0.169] Linking C shared library src\libmpg123\mpg123.dll
[build] FAILED: src/libmpg123/mpg123.dll src/libmpg123/mpg123.lib 
[build] cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=src\libmpg123\CMakeFiles\libmpg123.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1428~1.299\bin\Hostx64\x64\link.exe /nologo src\compat\CMakeFiles\compat.dir\D_\source\repos\mpg123-1.27.0\src\compat\compat.c.obj src\compat\CMakeFiles\compat.dir\D_\source\repos\mpg123-1.27.0\src\compat\compat_str.c.obj src\libmpg123\dct36_x86_64.S.obj src\libmpg123\dct64_x86_64_float.S.obj src\libmpg123\synth_x86_64_float.S.obj src\libmpg123\synth_x86_64_s32.S.obj src\libmpg123\synth_stereo_x86_64_float.S.obj src\libmpg123\synth_stereo_x86_64_s32.S.obj src\libmpg123\dct36_avx.S.obj src\libmpg123\dct64_avx_float.S.obj src\libmpg123\synth_stereo_avx_float.S.obj src\libmpg123\synth_stereo_avx_s32.S.obj src\libmpg123\getcpuflags_x86_64.S.obj src\libmpg123\synth_x86_64_accurate.S.obj src\libmpg123\synth_stereo_x86_64_accurate.S.obj src\libmpg123\synth_stereo_avx_accurate.S.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\parse.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\frame.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\format.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\dct64.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\equalizer.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\id3.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\optimize.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\readers.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\tabinit.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\libmpg123.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\index.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\icy.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\icy2utf8.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\layer1.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\layer2.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\layer3.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\lfs_alias.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\ntom.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\synth_8bit.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\synth.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\synth_s32.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\synth_real.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\stringbuf.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\feature.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\dither.c.obj  /out:src\libmpg123\mpg123.dll /implib:src\libmpg123\mpg123.lib /pdb:src\libmpg123\mpg123.pdb /dll /version:0.0 /machine:x64 /INCREMENTAL:NO  shlwapi.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cmd.exe /C "cd /D D:\source\repos\mpg123-1.27.0\build\src\libmpg123 && "C:\Program Files\PowerShell\7\pwsh.exe" -noprofile -executionpolicy Bypass -file D:/source/repos/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary D:/source/repos/mpg123-1.27.0/build/src/libmpg123/mpg123.dll -installedDir D:/source/repos/vcpkg/installed/x64-windows-static/bin -OutVariable out""
[build] LINK: command "C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1428~1.299\bin\Hostx64\x64\link.exe /nologo src\compat\CMakeFiles\compat.dir\D_\source\repos\mpg123-1.27.0\src\compat\compat.c.obj src\compat\CMakeFiles\compat.dir\D_\source\repos\mpg123-1.27.0\src\compat\compat_str.c.obj src\libmpg123\dct36_x86_64.S.obj src\libmpg123\dct64_x86_64_float.S.obj src\libmpg123\synth_x86_64_float.S.obj src\libmpg123\synth_x86_64_s32.S.obj src\libmpg123\synth_stereo_x86_64_float.S.obj src\libmpg123\synth_stereo_x86_64_s32.S.obj src\libmpg123\dct36_avx.S.obj src\libmpg123\dct64_avx_float.S.obj src\libmpg123\synth_stereo_avx_float.S.obj src\libmpg123\synth_stereo_avx_s32.S.obj src\libmpg123\getcpuflags_x86_64.S.obj src\libmpg123\synth_x86_64_accurate.S.obj src\libmpg123\synth_stereo_x86_64_accurate.S.obj src\libmpg123\synth_stereo_avx_accurate.S.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\parse.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\frame.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\format.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\dct64.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\equalizer.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\id3.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\optimize.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\readers.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\tabinit.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\libmpg123.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\index.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\icy.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\icy2utf8.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\layer1.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\layer2.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\layer3.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\lfs_alias.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\ntom.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\synth_8bit.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\synth.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\synth_s32.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\synth_real.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\stringbuf.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\feature.c.obj src\libmpg123\CMakeFiles\libmpg123.dir\D_\source\repos\mpg123-1.27.0\src\libmpg123\dither.c.obj /out:src\libmpg123\mpg123.dll /implib:src\libmpg123\mpg123.lib /pdb:src\libmpg123\mpg123.pdb /dll /version:0.0 /machine:x64 /INCREMENTAL:NO shlwapi.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:src\libmpg123\mpg123.dll.manifest" failed (exit code 1120) with the following output:
[build]    Creating library src\libmpg123\mpg123.lib and object src\libmpg123\mpg123.exp
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_open_fixed referenced in function mpg123_open_fixed_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_open referenced in function mpg123_open_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_open_fd referenced in function mpg123_open_fd_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_open_handle referenced in function mpg123_open_handle_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_decode_frame referenced in function mpg123_decode_frame_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_framebyframe_decode referenced in function mpg123_framebyframe_decode_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_framepos referenced in function mpg123_framepos_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_tell referenced in function mpg123_tell_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_tellframe referenced in function mpg123_tellframe_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_tell_stream referenced in function mpg123_tell_stream_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_seek referenced in function mpg123_seek_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_feedseek referenced in function mpg123_feedseek_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_seek_frame referenced in function mpg123_seek_frame_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_timeframe referenced in function mpg123_timeframe_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_index referenced in function mpg123_index_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_set_index referenced in function mpg123_set_index_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_position referenced in function mpg123_position_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_framelength referenced in function mpg123_framelength_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_length referenced in function mpg123_length_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_set_filesize referenced in function mpg123_set_filesize_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_replace_reader referenced in function mpg123_replace_reader_32
[build] lfs_alias.c.obj : error LNK2019: unresolved external symbol mpg123_replace_reader_handle referenced in function mpg123_replace_reader_handle_32
[build] src\libmpg123\mpg123.dll : fatal error LNK1120: 22 unresolved externals
[build] ninja: build stopped: subcommand failed.
[build] Build finished with exit code 1
1 Attachments

Discussion

1 2 3 > >> (Page 1 of 3)
  • Thomas Orgis

    Thomas Orgis - 2021-05-29

    Actually … it's the non-suffixed symbols not being exported and they are missed by the alias functions.

    This is a 32 bit build, right?

    Ah … you showed two differing cases. Yeas, definitely something off with LFS handling.

     

    Last edit: Thomas Orgis 2021-05-29
    • Evgeni Poberezhnikov

      No, it is x64 build.

      In attached CMakeCache.txt:

      CMAKE_C_COMPILER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29910/bin/Hostx64/x64/cl.exe

       
  • Thomas Orgis

    Thomas Orgis - 2021-05-29

    Also … looking at your CI stuff … seems like a lot is broken right now. The ARM build wants to include dct64_x86_64.S?! Where do we start?

     
    • Evgeni Poberezhnikov

      [driver] Switching to kit: Visual Studio Community 2019 Release - amd64_arm
      [main] Configuring folder: mpg123-1.27.0 
      [proc] Executing command: "c:/Program Files/CMake/bin/cmake.exe" --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:STRING=D:/temp/install -DCMAKE_TOOLCHAIN_FILE:STRING=d:/source/repos/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET:STRING=x64-windows-static -DCMAKE_MSVC_RUNTIME_LIBRARY:STRING=MultiThreaded$<$<CONFIG:Debug>:Debug> -DCMAKE_FIND_PACKAGE_PREFER_CONFIG:BOOL=TRUE -DCMAKE_ASM_NASM_COMPILER:STRING=d:/temp/nasm/nasm.exe -DYASM_ASSEMBLER:STRING=d:/temp/yasm/yasm.exe -DBUILD_SHARED_LIBS:BOOL=TRUE -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Release -Hd:/source/repos/mpg123-1.27.0/ports/cmake -Bd:/source/repos/mpg123-1.27.0/build -G Ninja
      [cmake] Not searching for unused variables given on the command line.
      [cmake] -- Could NOT find ALSA (missing: ALSA_LIBRARY ALSA_INCLUDE_DIR) 
      [cmake] -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
      [cmake] -- Detected machine: amd64
      [cmake] -- Configuring done
      [cmake] -- Generating done
      [cmake] -- Build files have been written to: D:/source/repos/mpg123-1.27.0/build
      

      Because MACHINE is detected as amd64.

      As i said before in #298, CMAKE_SYSTEM_PROCESSOR check is not good way to detect target processor architecture.

       
      • Thomas Orgis

        Thomas Orgis - 2021-05-29

        I don't remember getting a proper alternative to querying the processor. Can you specify this when calling cmake like giving --host/--target to autoconf? Do we need another manual override?

         
  • Thomas Orgis

    Thomas Orgis - 2021-05-29

    Addendum: Do you know how serious Microsoft is with warnings/misunderstandings like these?

             D:\buildtrees\mpg123\src\f1323a814d-106be2a1eb.clean\src\libsyn123\resample.c(2008,45): warning C4146: unary minus operator applied to unsigned type, result still unsigned [D:\buildtrees\mpg123\arm64-windows-dbg\src\libsyn123\libsyn123.vcxproj]
    

    The code in question passes a negated uint64_t into an int64_t argument … seemed fine so far?

     
    • Evgeni Poberezhnikov

      If code is correct just ignore that. We had ~1000 warnings in libsndfile like "blah-blah, conversion from type to another type, presicion may be lost".

      If you want to feel the pain add -Wconversionto gcc.

       
      • Thomas Orgis

        Thomas Orgis - 2021-05-29

        Ah, yeah, there is a reason why it is not part of -Wall. Got it.

         
  • Evgeni Poberezhnikov

    x86 build fails faster with:

    [build] D:\source\repos\mpg123-1.27.0\src\libout123\modules\win32_wasapi.c(548): error C2065: 'mpg123_PKEY_Device_FriendlyName': undeclared identifier
    
     
  • Evgeni Poberezhnikov

    Note that deleted Visual Studio solution exports these symbols.

     
  • Evgeni Poberezhnikov

    On Windows platform you can skip all these off_tand _FILE_OFFSET_BITS checks, it is useless, just assume 64-bit offsets are supported by default. Windows has non-standard extensions fro that: _fseeki64, _ftelli64 and company. Note that they don't use off_t which is always 32-bit.

     
  • Thomas Orgis

    Thomas Orgis - 2021-05-29

    So at least on Linux/x64, I get the alias symbols:

    $ cmake -DBUILD_SHARED_LIBS=on ../ports/cmake/
    $ make
    $ $ nm -g src/libmpg123/libmpg123.so |grep open_handle
    000000000002de6d T mpg123_open_handle
    000000000001cc7b T mpg123_open_handle_64
    

    Your manual build seems confused. I see this in CMakeCache.txt:

    //Test LFS_INSENSITIVE
    LFS_INSENSITIVE:INTERNAL=
    //Test LFS_SENSITIVE
    LFS_SENSITIVE:INTERNAL=
    

    So … which one is it? My cache has one of them set t o 1. You need LFS_SENSITIVE being true to include the wrapper functions (see ports/cmake/src/libmpg123/CMakeLists.txt). And where is your

    //Support large files (define _FILE_OFFSET_BITS)
    MPG123_LARGE_FILE_SUPPORT:BOOL=ON
    

    ?

     
    • Evgeni Poberezhnikov

      Why not?

      First LFS_INSENSITIVEfails because off_t is 32-bit on Windows. Than second LFS_SENSITIVE test fails because it is the same test with _FILE_OFFSET_BITS=64 set. But this define is ignored, off_t is still 32-bit.

       
  • Thomas Orgis

    Thomas Orgis - 2021-05-29

    OK, about the large file support: You are saying that with MSVC

    1. off_t is always 32 bit.
    2. One should use the i64 functions (which are available since _which _ Windows version?).

    So that is a different mode than what you get in a mingw environment, I suppose.

    The whole trouble only arises because I had off_t creep into the API. And normally, that type varies depending on build setup. If we say the platform (MSVC build) adheres to the above 2 points, I'd actually have to modify the API to take int64_t, always?

    We might have a look at what the old MSVC port did. But I imagine that it just disabled all largefile stuff. It also used the mpg123.h.in in a wrapping.

    Maybe we're fine with just inserting

    #define MPG123_NO_LARGENAME
    

    in the header? I think this effects to what the MSVC build did. It defined MPG123_NO_CONFIGURE, which also skipped the largename stuff. The libmpg123 build itself should use NO_LFS_ALIAS and false LFS_SENSITIVE, then.

    It would just not support large files, then, which is not that big a deal. A second step would be to add a MSVC mode to libmpg123 so that it does use the i64 functions internally and offers API with int64_t and 32 bit off_t, mirroring quite exactly what it does now on Unix and mingw.

     
    • Evgeni Poberezhnikov

      If i add MPG123_NO_LARGENAME x64 build now fails with the same error as x86:

      [build] D:\source\repos\mpg123-1.27.0\src\libout123\modules\win32_wasapi.c(548): error C2065: 'mpg123_PKEY_Device_FriendlyName': undeclared identifier
      
       
      • Thomas Orgis

        Thomas Orgis - 2021-05-29

        That looks like progress;-) This seems to be a logic issue in src/libout123/modules/win32_wasapi.c, then. JonY last updated it in mingw where we do our official Windows binaries. The branch with _MSC_VER needs fixing.

         
  • Thomas Orgis

    Thomas Orgis - 2021-05-29

    Btw, this is the old envelope over mpg123.h: http://scm.orgis.org/view/mpg123/tags/1.26.5/ports/MSVC%2B%2B/mpg123.h?view=markup

    This includes mpg123_topen() and mpg123_tclose() prototypes. They are defined in

    http://scm.orgis.org/view/mpg123/tags/1.26.5/ports/MSVC%2B%2B/msvc.c?view=markup

    We forgot that stuff for an actual MSVC build. Well, the latter is not essential, I presume … things should work via UTF8 arguments … but you might prefer that.

    I cannot help you much with that, as I don't work in MSVC and couldn't test anything. I can give pointers. We could intergrate the msvc.c back into the codebase and have the cmake build reference it inside MSVC, well just like the project file did before.

    The wrapping of the header could be avoided by some more .in replacing, I guess.

     
  • Thomas Orgis

    Thomas Orgis - 2021-05-29

    (Btw: LFS_INSENSITIVE failing because off_t is always 32 bit … I'd assume that is being insensitive, exactly. So the build should proceed without wrappers and without alias, it needs NO_LFS_ALIAS defined for CMake)

     
  • Evgeni Poberezhnikov

    Completly untested fix for 'mpg123_PKEY_Device_FriendlyName': undeclared identifier:

    // 1CB9AD4C-DBFA-4c32-B178-C2F568A703B2
    DEFINE_GUID(mpg123_IID_IAudioClient, 0x1CB9AD4C, 0xDBFA, 0x4c32, 0xB1, 0x78, 0xC2, 0xF5, 0x68, 0xA7, 0x03, 0xB2);
    // A95664D2-9614-4F35-A746-DE8DB63617E6
    DEFINE_GUID(mpg123_IID_IMMDeviceEnumerator, 0xA95664D2, 0x9614, 0x4F35, 0xA7, 0x46, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6);
    // BCDE0395-E52F-467C-8E3D-C4579291692E
    DEFINE_GUID(mpg123_CLSID_IMMDeviceEnumerator, 0xBCDE0395, 0xE52F, 0x467C, 0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E);
    // F294ACFC-3146-4483-A7BF-ADDCA7C260E2
    DEFINE_GUID(mpg123_IID_IAudioRenderClient, 0xF294ACFC, 0x3146, 0x4483, 0xA7, 0xBF, 0xAD, 0xDC, 0xA7, 0xC2, 0x60, 0xE2);
    #define mpg123_PKEY_Device_FriendlyName PKEY_Device_FriendlyName
    
     
  • Evgeni Poberezhnikov

    Now i have:

    [build] win32_wasapi.c.obj : error LNK2019: unresolved external symbol INT123_win32_wide_utf8 referenced in function enumerate_win32
    [build] win32_wasapi.c.obj : error LNK2019: unresolved external symbol INT123_win32_utf8_wide referenced in function open_win32
    

    😄

     
    • Thomas Orgis

      Thomas Orgis - 2021-05-29

      We're getting closer. I activated JonY, who does the Windows stuff (mingw). We're on it … hopefully we get this settled together.

       
    • Jonathan Yong

      Jonathan Yong - 2021-05-29

      Those symbols are in src/compat/compat.c, are those compiled in MSVC?
      Edit: those are in src/compat/compat_str.c not compat.c.

       

      Last edit: Jonathan Yong 2021-05-29
  • Jonathan Yong

    Jonathan Yong - 2021-05-29

    I just checked in the macro fix for src/libout123/modules/win32_wasapi.c into trunk, can you test that out?

     
    • Evgeni Poberezhnikov

      I'm testing it right now

       
  • Thomas Orgis

    Thomas Orgis - 2021-05-29

    Each add_library() for an output module in ports/cmake/src/libout123/modules/CMakeLists.txt needs $<TARGET_OBJECTS:compat_str> to get the win32 string functions. Well, most don't need it, but the windows ones do.

    You could of course disable modules and have only one audio API built into libout123. Then also the str functions should be there.

     
1 2 3 > >> (Page 1 of 3)

Log in to post a comment.