Git Product home page Git Product logo

Comments (11)

li-zhi avatar li-zhi commented on August 26, 2024

@tjtjtjtj-tw If you look carefully, it might be that the building of the ptools library failed. Would you like to cd to ptools dir and see if you can make it successfully there?

from vmaf.

tjtjtjtj-tw avatar tjtjtjtj-tw commented on August 26, 2024

Dear li-zhi,

I see there is a libptools.so successfully built.
ptool directory is built using Makefile.VMAF.

So... am I wrong with something?
I don't know if Cygwin + Makefile.VMAF in ptool directory is supposed to be used or not.

Thank you.

from vmaf.

tjtjtjtj-tw avatar tjtjtjtj-tw commented on August 26, 2024

The error message from make is:

make[1]: Entering directory '/home/tjtjtjtj/vmaf-master/wrapper'
g++ -o vmafossexec /home/tjtjtjtj/vmaf-master/wrapper/obj/alloc.o /home/tjtjtjtj/vmaf-master/wrapper/obj/file_io.o /home/tjtjtjtj/vmaf-master/wrapper/obj/cpu.o /home/tjtjtjtj/vmaf-master/wrapper/obj/convolution.o /home/tjtjtjtj/vmaf-master/wrapper/obj/convolution_avx.o /home/tjtjtjtj/vmaf-master/wrapper/obj/adm.o /home/tjtjtjtj/vmaf-master/wrapper/obj/adm_tools.o /home/tjtjtjtj/vmaf-master/wrapper/obj/ansnr.o /home/tjtjtjtj/vmaf-master/wrapper/obj/ansnr_tools.o /home/tjtjtjtj/vmaf-master/wrapper/obj/vif.o /home/tjtjtjtj/vmaf-master/wrapper/obj/vif_tools.o /home/tjtjtjtj/vmaf-master/wrapper/obj/motion.o /home/tjtjtjtj/vmaf-master/wrapper/obj/psnr.o /home/tjtjtjtj/vmaf-master/wrapper/obj/math_utils.o /home/tjtjtjtj/vmaf-master/wrapper/obj/convolve.o /home/tjtjtjtj/vmaf-master/wrapper/obj/decimate.o /home/tjtjtjtj/vmaf-master/wrapper/obj/ssim_tools.o /home/tjtjtjtj/vmaf-master/wrapper/obj/ssim.o /home/tjtjtjtj/vmaf-master/wrapper/obj/ms_ssim.o /home/tjtjtjtj/vmaf-master/wrapper/obj/svm.o /home/tjtjtjtj/vmaf-master/wrapper/obj/combo.o /home/tjtjtjtj/vmaf-master/wrapper/obj/vmaf.o /home/tjtjtjtj/vmaf-master/wrapper/obj/darray.o /home/tjtjtjtj/vmaf-master/wrapper/obj/main.o /home/tjtjtjtj/vmaf-master/wrapper/obj/pugixml.o -L/home/tjtjtjtj/vmaf-master/wrapper/../ptools -lm -lpthread -lptools -Wl,-rpath=/home/tjtjtjtj/vmaf-master/wrapper/../ptools

/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lptools

collect2: Error:ld return 1
make[1]: *** [Makefile:129: vmafossexec] Error 1
make[1]: Leaving directory '/home/tjtjtjtj/vmaf-master/wrapper'

from vmaf.

cosmin avatar cosmin commented on August 26, 2024

If I remember correctly someone had a similar issue with lptools on Linux that ended up being caused by Windows style line endings (based on how they cloned the repo). Since you are having a similar issue on Cygwin I wonder if this is a similar issue. Can you try to run dos2unix on the entire checkout? (Or change your git settings to preserve the original line endings). I wonder if that would make a difference.

from vmaf.

tjtjtjtj-tw avatar tjtjtjtj-tw commented on August 26, 2024

@cosmin
I tried to dos2unix everything hierarchically under vmaf-master/ptool as well as vmaf-master/wrapper, and this doesn't make any difference.
The problem remains.
However, thank you anyway.

from vmaf.

li-zhi avatar li-zhi commented on August 26, 2024

@tjtjtjtj-tw It's probably related to wrapper/Makefile. I have this switch:

vmafossexec: $(OBJS)
ifeq ($(shell uname),Darwin)
$(CXX) -o $@ $(LDFLAGS) $^ -L$(PTOOLSDIR) $(LIBS) -Wl
else
$(CXX) -o $@ $(LDFLAGS) $^ -L$(PTOOLSDIR) $(LIBS) -Wl,-rpath=$(PTOOLSDIR)
endif

It detects the OS version (Darwin is for mac os) and run differently to build vmafossexec. I don't know what's the correct way for cygwin, you can probably try it out.

(Also in ptools, there is another switch:

libptools : $(COM_OBJS)
ifeq ($(shell uname),Darwin)
$(CC) $(CCFLAGS) $(COM_OBJS) -dynamiclib -install_name $(shell pwd)/libptools.dylib -o libptools.dylib
else
$(CC) $(CCFLAGS) $(COM_OBJS) -shared -o libptools.so
endif

here libptools.dylib is for mac os and libptools.so is for linux/debian only(?)

)

from vmaf.

tjtjtjtj-tw avatar tjtjtjtj-tw commented on August 26, 2024

The settings for Mac doesn't work correctly in Cygwin.
The problem remains.

from vmaf.

tjtjtjtj-tw avatar tjtjtjtj-tw commented on August 26, 2024

@li-zhi @cosmin
Dear all,

I do a modification for Makefile in ptool directory for Cygwin.
The libptools is supposed to be a shared library (libptools.so in Linux and libptools.dylib in Mac OS) originally .
I added one line to create a static library "libptools.a".
Then the vmafossexec.exe is successfully created. (However it is a 6737898-byte executable. XD )

Change from:
=======Original Makefile(in ptools directory) begin=======
libptools : $(COM_OBJS)
ifeq ($(shell uname),Darwin)
$(CC) $(CCFLAGS) $(COM_OBJS) -dynamiclib -install_name $(shell pwd)/libptools.dylib -o libptools.dylib
else
$(CC) $(CCFLAGS) $(COM_OBJS) -shared -o libptools.so
endif

=======Original Makefile(in ptools directory) end=======

Change to:
=======Modified Makefile(in ptools directory) begin=======
libptools : $(COM_OBJS)
ifeq ($(shell uname),Darwin)
$(CC) $(CCFLAGS) $(COM_OBJS) -dynamiclib -install_name $(shell pwd)/libptools.dylib -o libptools.dylib
else
$(CC) $(CCFLAGS) $(COM_OBJS) -shared -o libptools.so

ar rcs libptools.a $(COM_OBJS)

endif
=======Modified Makefile(in ptools directory) end=======

from vmaf.

tjtjtjtj-tw avatar tjtjtjtj-tw commented on August 26, 2024

I am not an expert in makefile writing so it is kind if anyone familiar with it can commit the modification for Cygwin properly.

I summarize the change need to be applied to let vmaf be created successfully in Cygwin :

  1. Add "-D_GNU_SOURCE" to CXXFLAGS in vmaf-master/wrapper/Makefile to let several C++ source file compile successfully.
  2. Add "ar rcs libptools.a $(COM_OBJS)" in vmaf-master/ptools/Makefile to create a static library "libptools.a".

from vmaf.

li-zhi avatar li-zhi commented on August 26, 2024

@tjtjtjtj-tw Thanks for the suggestion. Please keep this thread open so that I (or someone else) could pick it up later.

from vmaf.

 avatar commented on August 26, 2024

i have same problem
what exactly means
Add "-D_GNU_SOURCE" to CXXFLAGS in vmaf-master/wrapper/Makefile to let several C++ source file compile successfully.
where i should add "-D_GNU_SOURCE" ?

from vmaf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.