Menu

#351 add an option to build only the library

svn
closed-fixed
nobody
build (2)
5
2023-09-23
2023-05-27
No

Hello

would it be possible to add an option to build only the library ?

thank you

Vincent

Discussion

  • Thomas Orgis

    Thomas Orgis - 2023-05-27

    Well, you can build just the library by issuing make src/libmpg123/libmpg123.la, but there's no separate install target just for this. Well, there probably is some automake-internal target.

    Do you need full make install support for "just the lib"? And do you only mean libmpg123?

    --
    sent from mobile device, trustworthy or not

     
  • Vincent TORRI

    Vincent TORRI - 2023-05-27

    i'll see if make src/libmpg123/libmpg123.la is sufficient for me. If so, i'll let you inform

    thank you

    Vincent Torri

     
  • Vincent TORRI

    Vincent TORRI - 2023-05-27

    make src/libmpg123/libmpg123.la install still build the exe

     
    • Thomas Orgis

      Thomas Orgis - 2023-05-27

      Of course, the install target depends on the whole thing. This is what I meant.

       
      • Thomas Orgis

        Thomas Orgis - 2023-05-27

        After make src/libmpg123/libmpg123.la, you got the result in src/libmpg123/.libs, FWIW. Ypu can take the .so or .a file and have fun with it. But I see that you'd like to install only the selected parts into a target prefix.

        We could add something for that. But a step back: Do you have actual trouble building the app and other libs? Where from does the need arise? The whole thing is not exactly heavy.

         
  • Vincent TORRI

    Vincent TORRI - 2023-05-27

    I have no trouble, it's just that made an installer on Windows for dependencies of a framework, and I only need the library. So I have to remove by hand in my scripts the binaries (i need headers, not only the lib). Not a big deal, though.

     
  • Thomas Orgis

    Thomas Orgis - 2023-09-02

    I added now ./configure --disable-components --enable-libmpg123 which only builds libmpg123, also for the install target. Does that do the trick?

     
  • Ozkan Sezer

    Ozkan Sezer - 2023-09-07

    --disable-components doesn't seem to disable modules, which I believe that it should.

     
    • Thomas Orgis

      Thomas Orgis - 2023-09-07

      Am Thu, 07 Sep 2023 04:35:36 -0000
      schrieb "Ozkan Sezer" sezero@users.sourceforge.net:

      --disable-components doesn't seem to disable modules, which I believe that it should.

      Modules are a part of libout123 if it is built. I thought that's
      optional. What do you expect, exactly? Hm. You mean you'd also like to
      be able to build exactly one output module, without the libs?
      Separating package builds for binaries, libraries, modules?

      Otherwise, please specify the use case.

       
      • Ozkan Sezer

        Ozkan Sezer - 2023-09-07

        Well, I don't need the output modules at all: they make sense only when libout123 is built, do they not?

        As for my specific use case: In one of my windows (mingw) build attempts, the configury looked for GetThreadErrorMode (because modules weren't disabled as I had first thought) and errored out when it failed to find it in my old outdated toolchain. When I added --disable-modules after --disable-components, things worked just fine.

        Not really a big thing, but for me --disable-components implies --disable-modules, but it's just me..

         
  • Thomas Orgis

    Thomas Orgis - 2023-09-12

    Wait, you had a configure failure with --disable-components just because modules weren't disabled? The tests for them should just fail and disable modules, not break your build.

    I'll have to think a bit about that before release. I see how you can see the modules as separat component at the same level as the libs.

     
    • Ozkan Sezer

      Ozkan Sezer - 2023-09-12

      Thank you.

       
  • Thomas Orgis

    Thomas Orgis - 2023-09-13

    Please confirm the kind of breakage you have seen. What was the exact configure line? I'd like to see the break in the logic before changing it again.

     
    • Ozkan Sezer

      Ozkan Sezer - 2023-09-13

      The only args to configure were --disable-components --host=x86_64-w64-mingw32

      The full output below, using latest unmodified svn:

      $ PATH=/opt/cross_win64/bin:$PATH ./configure --disable-components --host=x86_64-w64-mingw32
      checking build system type... i686-pc-linux-gnu
      checking host system type... x86_64-w64-mingw32
      checking for a BSD-compatible install... /usr/bin/install -c
      checking whether build environment is sane... yes
      checking for x86_64-w64-mingw32-strip... x86_64-w64-mingw32-strip
      checking for a thread-safe mkdir -p... /bin/mkdir -p
      checking for gawk... gawk
      checking whether make sets $(MAKE)... yes
      checking whether make supports nested variables... yes
      checking for -Werror in CFLAGS (It breaks tests)... no
      checking if you are up to something totally static with LDFLAGS/CFLAGS... no
      checking whether make supports the include directive... yes (GNU style)
      checking for x86_64-w64-mingw32-gcc... x86_64-w64-mingw32-gcc
      checking whether the C compiler works... yes
      checking for C compiler default output file name... a.exe
      checking for suffix of executables... .exe
      checking whether we are cross compiling... yes
      checking for suffix of object files... o
      checking whether we are using the GNU C compiler... yes
      checking whether x86_64-w64-mingw32-gcc accepts -g... yes
      checking for x86_64-w64-mingw32-gcc option to accept ISO C89... none needed
      checking whether x86_64-w64-mingw32-gcc understands -c and -o together... yes
      checking dependency style of x86_64-w64-mingw32-gcc... gcc3
      checking dependency style of x86_64-w64-mingw32-gcc... gcc3
      checking for x86_64-w64-mingw32-gcc option to accept ISO C99... -std=gnu99
      checking how to run the C preprocessor... x86_64-w64-mingw32-gcc -std=gnu99 -E
      checking for library containing clock_gettime... no
      checking for clock_gettime... no
      checking for grep that handles long lines and -e... /bin/grep
      checking for egrep... /bin/grep -E
      checking for an ANSI C-conforming const... yes
      checking for inline... inline
      checking for ANSI C header files... yes
      checking for sys/types.h... yes
      checking for sys/stat.h... yes
      checking for stdlib.h... yes
      checking for string.h... yes
      checking for memory.h... yes
      checking for strings.h... yes
      checking for inttypes.h... yes
      checking for stdint.h... yes
      checking for unistd.h... yes
      checking whether byte ordering is bigendian... no
      checking windows.h usability... yes
      checking windows.h presence... yes
      checking for windows.h... yes
      checking if this is a UWP build... no
      checking if LoadLibrary should be used... Using LoadLibrary
      We found a runtime loader: Modules enabled.
      checking how to print strings... printf
      checking for a sed that does not truncate output... /bin/sed
      checking for fgrep... /bin/grep -F
      checking for ld used by x86_64-w64-mingw32-gcc -std=gnu99... /opt/cross_win64/x86_64-w64-mingw32/bin/ld
      checking if the linker (/opt/cross_win64/x86_64-w64-mingw32/bin/ld) is GNU ld... yes
      checking for BSD- or MS-compatible name lister (nm)... /opt/cross_win64/bin/x86_64-w64-mingw32-nm -B
      checking the name lister (/opt/cross_win64/bin/x86_64-w64-mingw32-nm -B) interface... BSD nm
      checking whether ln -s works... yes
      checking the maximum length of command line arguments... 1966080
      checking how to convert i686-pc-linux-gnu file names to x86_64-w64-mingw32 format... func_convert_file_nix_to_w32
      checking how to convert i686-pc-linux-gnu file names to toolchain format... func_convert_file_noop
      checking for /opt/cross_win64/x86_64-w64-mingw32/bin/ld option to reload object files... -r
      checking for x86_64-w64-mingw32-objdump... x86_64-w64-mingw32-objdump
      checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
      checking for x86_64-w64-mingw32-dlltool... x86_64-w64-mingw32-dlltool
      checking how to associate runtime and link libraries... func_cygming_dll_for_implib
      checking for x86_64-w64-mingw32-ar... x86_64-w64-mingw32-ar
      checking for archiver @FILE support... @
      checking for x86_64-w64-mingw32-strip... (cached) x86_64-w64-mingw32-strip
      checking for x86_64-w64-mingw32-ranlib... x86_64-w64-mingw32-ranlib
      checking command to parse /opt/cross_win64/bin/x86_64-w64-mingw32-nm -B output from x86_64-w64-mingw32-gcc -std=gnu99 object... ok
      checking for sysroot... no
      checking for a working dd... /bin/dd
      checking how to truncate binary pipes... /bin/dd bs=4096 count=1
      checking for x86_64-w64-mingw32-mt... no
      checking for mt... no
      checking if : is a manifest tool... no
      checking for dlfcn.h... no
      checking for x86_64-w64-mingw32-as... x86_64-w64-mingw32-as
      checking for x86_64-w64-mingw32-dlltool... (cached) x86_64-w64-mingw32-dlltool
      checking for x86_64-w64-mingw32-objdump... (cached) x86_64-w64-mingw32-objdump
      checking for objdir... .libs
      checking if x86_64-w64-mingw32-gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
      checking for x86_64-w64-mingw32-gcc -std=gnu99 option to produce PIC... -DDLL_EXPORT -DPIC
      checking if x86_64-w64-mingw32-gcc -std=gnu99 PIC flag -DDLL_EXPORT -DPIC works... yes
      checking if x86_64-w64-mingw32-gcc -std=gnu99 static flag -static works... yes
      checking if x86_64-w64-mingw32-gcc -std=gnu99 supports -c -o file.o... yes
      checking if x86_64-w64-mingw32-gcc -std=gnu99 supports -c -o file.o... (cached) yes
      checking whether the x86_64-w64-mingw32-gcc -std=gnu99 linker (/opt/cross_win64/x86_64-w64-mingw32/bin/ld) supports shared libraries... yes
      checking whether -lc should be explicitly linked in... yes
      checking dynamic linker characteristics... Win32 ld.exe
      checking how to hardcode library paths into programs... immediate
      checking whether stripping libraries is possible... yes
      checking if libtool supports shared libraries... yes
      checking whether to build shared libraries... yes
      checking whether to build static libraries... no
      checking what extension is used for runtime loadable modules... .dll
      We assume IEEE754 floating point format.
      checking if .balign is present... yes
      checking __attribute__((aligned(16)))... yes
      checking if assembler supports AVX instructions... yes
      checking stdio.h usability... yes
      checking stdio.h presence... yes
      checking for stdio.h... yes
      checking for stdlib.h... (cached) yes
      checking for string.h... (cached) yes
      checking for unistd.h... (cached) yes
      checking sched.h usability... no
      checking sched.h presence... no
      checking for sched.h... no
      checking sys/ioctl.h usability... no
      checking sys/ioctl.h presence... no
      checking for sys/ioctl.h... no
      checking for sys/types.h... (cached) yes
      checking for stdint.h... (cached) yes
      checking limits.h usability... yes
      checking limits.h presence... yes
      checking for limits.h... yes
      checking for inttypes.h... (cached) yes
      checking sys/time.h usability... yes
      checking sys/time.h presence... yes
      checking for sys/time.h... yes
      checking sys/wait.h usability... no
      checking sys/wait.h presence... no
      checking for sys/wait.h... no
      checking sys/resource.h usability... no
      checking sys/resource.h presence... no
      checking for sys/resource.h... no
      checking sys/signal.h usability... no
      checking sys/signal.h presence... no
      checking for sys/signal.h... no
      checking signal.h usability... yes
      checking signal.h presence... yes
      checking for signal.h... yes
      checking sys/select.h usability... no
      checking sys/select.h presence... no
      checking for sys/select.h... no
      checking dirent.h usability... yes
      checking dirent.h presence... yes
      checking for dirent.h... yes
      checking for sys/stat.h... (cached) yes
      checking for size_t... yes
      checking for uintptr_t... yes
      checking for ssize_t... yes
      checking for ptrdiff_t... yes
      checking for int32_t... yes
      checking for int64_t... yes
      checking for uint32_t... yes
      checking for int16_t... yes
      checking for uint16_t... yes
      checking size of size_t... 8
      checking size of ssize_t... 8
      checking size of int32_t... 4
      checking size of long... 4
      checking switched off_t size... 4
      checking size of off_t... 4
      checking if native off_t is already 64 bits... no
      checking for lseek64... yes
      checking for off64_t... yes
      checking if we have O_LARGEFILE... no
      checking for mmap... no
      checking sys/ipc.h usability... no
      checking sys/ipc.h presence... no
      checking for sys/ipc.h... no
      checking sys/shm.h usability... no
      checking sys/shm.h presence... no
      checking for sys/shm.h... no
      checking for shmget... no
      checking for shmat... no
      checking for shmdt... no
      checking for shmctl... no
      checking POSIX termios... no
      checking if we have wincon.h... yes
      checking for random... no
      checking for setenv... no
      checking for unsetenv... no
      checking for sched_setscheduler... no
      checking for setuid... no
      checking for getuid... no
      checking for setpriority... no
      checking for strerror... yes
      checking for strerror_l... no
      checking for uselocale... no
      checking for setlocale... yes
      checking for nl_langinfo... no
      checking for mbstowcs... yes
      checking for wcstombs... yes
      checking for wcswidth... no
      checking for iswprint... yes
      checking for atoll... yes
      checking for mkfifo... no
      checking for fork... no
      checking for ctermid... no
      checking locale.h usability... yes
      checking locale.h presence... yes
      checking for locale.h... yes
      checking langinfo.h usability... no
      checking langinfo.h presence... no
      checking for langinfo.h... no
      checking wchar.h usability... yes
      checking wchar.h presence... yes
      checking for wchar.h... yes
      checking wctype.h usability... yes
      checking wctype.h presence... yes
      checking for wctype.h... yes
      checking netdb.h usability... no
      checking netdb.h presence... no
      checking for netdb.h... no
      checking sys/param.h usability... yes
      checking sys/param.h presence... yes
      checking for sys/param.h... yes
      checking sys/socket.h usability... no
      checking sys/socket.h presence... no
      checking for sys/socket.h... no
      checking netinet/in.h usability... no
      checking netinet/in.h presence... no
      checking for netinet/in.h... no
      checking arpa/inet.h usability... no
      checking arpa/inet.h presence... no
      checking for arpa/inet.h... no
      checking for library containing gethostbyname... no
      checking for library containing socket... no
      checking for getaddrinfo... no
      checking for sqrt in -lm... yes
      checking for powf in -lmx... no
      checking byteswap.h usability... no
      checking byteswap.h presence... no
      checking for byteswap.h... no
      checking os2.h usability... no
      checking os2.h presence... no
      checking for os2.h... no
      checking if we want feature report function... yes
      checking for x86_64-w64-mingw32-pkg-config... no
      checking for pkg-config... /usr/bin/pkg-config
      configure: WARNING: using cross tools not prefixed with host triplet
      checking pkg-config is at least version 0.9.0... yes
      checking for libpulse-simple... yes
      checking for snd_pcm_open in -lasound... no
      checking for pcm_open in -ltinyalsa... no
      checking sys/soundcard.h usability... no
      checking sys/soundcard.h presence... no
      checking for sys/soundcard.h... no
      checking linux/soundcard.h usability... no
      checking linux/soundcard.h presence... no
      checking for linux/soundcard.h... no
      checking machine/soundcard.h usability... no
      checking machine/soundcard.h presence... no
      checking for machine/soundcard.h... no
      checking AudioUnit/AudioUnit.h usability... no
      checking AudioUnit/AudioUnit.h presence... no
      checking for AudioUnit/AudioUnit.h... no
      checking AudioToolbox/AudioToolbox.h usability... no
      checking AudioToolbox/AudioToolbox.h presence... no
      checking for AudioToolbox/AudioToolbox.h... no
      checking for sndio... no
      checking sun/audioio.h usability... no
      checking sun/audioio.h presence... no
      checking for sun/audioio.h... no
      checking sys/audioio.h usability... no
      checking sys/audioio.h presence... no
      checking for sys/audioio.h... no
      checking asm/audioio.h usability... no
      checking asm/audioio.h presence... no
      checking for asm/audioio.h... no
      checking sys/audio.h usability... no
      checking sys/audio.h presence... no
      checking for sys/audio.h... no
      checking if we have wasapi headers... no
      checking for os2.h... (cached) no
      checking for esound... no
      checking for sem_post in -lpthread... no
      checking for Pa_Initialize in -lportaudio... no
      checking for sdl2... no
      checking for sdl... yes
      checking for AuOpenServer in -laudio... no
      checking for artsc... no
      checking OpenAL/al.h usability... no
      checking OpenAL/al.h presence... no
      checking for OpenAL/al.h... no
      checking OpenAL/alc.h usability... no
      checking OpenAL/alc.h presence... no
      checking for OpenAL/alc.h... no
      checking AL/al.h usability... no
      checking AL/al.h presence... no
      checking for AL/al.h... no
      checking AL/alc.h usability... no
      checking AL/alc.h presence... no
      checking for AL/alc.h... no
      checking al.h usability... no
      checking al.h presence... no
      checking for al.h... no
      checking alc.h usability... no
      checking alc.h presence... no
      checking for alc.h... no
      checking if you are too dumbing dumb for the dummy... no
      checking _mingw_mac.h usability... yes
      checking _mingw_mac.h presence... yes
      checking for _mingw_mac.h... yes
      checking for _wopen... yes
      checking if we want Unicode File Open for Win32... yes
      checking if Unicode functions working... yes
      checking ws2tcpip.h usability... yes
      checking ws2tcpip.h presence... yes
      checking for ws2tcpip.h... yes
      checking if we want Win32 sockets... yes
      checking if winsock2 API is available... yes
      checking if we have Named Pipes... yes
      checking if we have GetThreadErrorMode... checking if we have GetThreadErrorMode... no
      configure: error: GetThreadErrorMode is required but not found
      
       
      • Thomas Orgis

        Thomas Orgis - 2023-09-13

        Am Wed, 13 Sep 2023 10:22:28 -0000
        schrieb "Ozkan Sezer" sezero@users.sourceforge.net:

        The only args to configure were --disable-components --host=x86_64-w64-mingw32

        checking if we have GetThreadErrorMode... checking if we have GetThreadErrorMode... no
        configure: error: GetThreadErrorMode is required but not found

        Thanks. This has nothing to do with --disable-components, though. If
        modules are not disabled per choice, you get that error if
        GetTheadErrorMode is not available in a Windows context.

        We should change that to simply disable modules (in case they're not
        enabled explicitly by the user) instead of fail.

        I also thought a bit: the modules switch really is not just about
        building modules themselves, but about building libout123 with the
        feature of being able to load modules. You can choose a list of modules
        to build, anyway (need to mentally separate the concepts of
        --with-audio and --with-default-audio).

        What I will test is how a a build of --disable-components
        --enable-modules --with-audio=... works to build only audio modules.
        Distros hack around that a bit right now.

         
  • Thomas Orgis

    Thomas Orgis - 2023-09-23

    There's --enable-libout123-modules now.

     
  • Thomas Orgis

    Thomas Orgis - 2023-09-23
    • status: open --> closed-fixed
     

Log in to post a comment.