Tag Archives: github

COLMAP Install Error: Undefined reference to libtiff4.0 [Solved]

At Ubuntu 20 When installing colmap under 04 system, run under /colmap/build folder

make -j

The following errors are reported:

/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFReadEncodedStrip@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFReadEXIFDirectory@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldReadCount@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFSetTagExtender@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFCurrentDirectory@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFReadTile@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFSetDirectory@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFClientOpen@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFSetField@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFScanlineSize@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFWriteDirectory@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFTileRowSize@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFWriteScanline@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFGetFieldDefaulted@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFReadDirectory@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFIsTiled@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldDataType@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFSwabArrayOfLong@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFMergeFieldInfo@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFLastDirectory@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `_TIFFDataSize@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFSetSubDirectory@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldPassCount@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldWithTag@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFReadRGBAImage@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFClose@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFGetTagListCount@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFDefaultStripSize@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldTag@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFGetTagListEntry@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFComputeStrip@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFDataWidth@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFFieldName@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFIsByteSwapped@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFGetField@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFTileSize@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libfreeimage.so: undefined reference to `TIFFStripSize@LIBTIFF_4.0'
collect2: error: ld returned 1 exit status
src/mvs/CMakeFiles/normal_map_test.dir/build.make:163: recipe for target 'src/mvs/normal_map_test' failed
make[2]: *** [src/mvs/normal_map_test] Error 1

Conduct in-depth investigation and find that there is a Warning in the previous cmake…:

runtime library [libgmp.so.10] in /usr/lib/x86_64-linux-gnu may be hidden by files in: /home/damon/anaconda2/lib

It turns out that anaconda’s Qt is used, so add the following fields to Cmakelist.txt in the colmap folder to force the switch to system Qt

SET(CMAKE_PREFIX_PATH "/usr/lib/x86_64-linux-gnu/cmake")

Re-execute make – j and it will be OK!

Note: If you have previously made and failed, you need to delete all the files in the build folder and then make -j again, otherwise it will still fail

[Solved] import cv2 Error: ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Execute the following command:

    import cv2
  File "/appletree/miniconda3/envs/yyp_pytorch/lib/python3.7/site-packages/cv2/__init__.py", line 5, in <module>
    from .cv2 import *
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Reason: libGL.so.1 is missing.
Solution:
execute the following command after pip install opencv-python

pip install opencv-python-headless

[Solved] Failed to find glog – Could not find glog include directory, set…

catkin_make Compile Error:

– Found OpenCV: /opt/ros/kinetic (found version “3.3.1”)
CMake Error at cmake/FindGlog.cmake:77 (MESSAGE):
Failed to find glog - Could not find glog include directory, set
GLOG_INCLUDE_DIR to directory containing glog/logging.h
Call Stack (most recent call first):
cmake/FindGlog.cmake:103 (GLOG_REPORT_NOT_FOUND)
CMakeLists.txt:147 (find_package)

 

Solution:
$ sudo apt-get install libgoogle-glog-dev

[Solved] LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

There is an error when using git to pull the GitHub code base

LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

The solution is as follows:
1 Cancel global proxy first:

git config --global --unset https.proxy
git config --global --unset http.proxy

2. Configure global agent:

git config --global http.https://github.com.proxy socks5://127.0.0.1:1080 
git config --global https.https://github.com.proxy socks5://127.0.0.1:1080

Note that 1080 is changed to the port number of its own proxy service

[Solved] error: Pulling is not possible because you have unmerged files

Scene

For the same repository, Jane and Flora each pulled code from the master branch of the repository.
Jane commits the modified code to the master branch first.
Flora then commits the modified code to the master branch, and finds that the remote repository master branch code has changed due to Jane’s commit, which prompts “Updates were rejected because the tip of your current branch is behind” when committing. branch is behind”

When Flora tried to pull the master branch code for merging, it prompted “error: Pulling is not possible because you have unmerged files”

Solution:

git add -u 
git commit -m "xxxx" 
git pull
git push 

First, the file will be stored in the staging area and then commit the comments, and then git pull will not report an error
This kind of error is generally thought to have a conflict file, need to resolve the conflict or merge files, after the solution or merge need to recommit, not limited to pulling

[Solved] git Error: error: dst refspec v0.10.2 matches more than one

Problem description

If the tag and heads have the same name, an error will be reported

error: dst refspec v0. 10.2 matches more than one

Problem analysis

refs/heads/* is the branch name refs/tags/* is the tag name refs/remotes/* is the remote track name

When naming heads, it generally uses main, master, that is refs/heads/Master, refs/heads/main
when naming tags, it usually uses v0.1, v0. 2, i.e. refs/tags/v1.0

When you execute git push origin master, because Master is generally only in heads, not in tags, GIT can directly find the branch you want to push.

But here:

git LS remote the results are as follows:

61d10100326130d2eceee85167d5ec2d9970ebbe        refs/heads/seq_task
4ee9724f3a6a47134483e4955c688f4f34432ee0        refs/heads/simulastsharedtask
83e615d66905b8ca7483122a37da1a85f13f4b8e        refs/heads/v0.10.2
bdf09e1321a77252835550e84d73ad1bb3f3173c        refs/heads/xlmr_benchmark
3e5a2739bce92b2516d060959a1aa3dd51d221dc        refs/tags/v0.10.0
8a0b56efeecba6941c1c0e81a3b86f0a219e6653        refs/tags/v0.10.1
83e615d66905b8ca7483122a37da1a85f13f4b8e        refs/tags/v0.10.2

Twice v0.10.2 , corresponding to tags and heads respectively, so an error is reported.

Solution:

    1. change the name of the branch’s heads or tags (the change method is Google). Push

git push origin refs/heads/Main: refs/tags/V1 with the full name of the branch 2 

Reference resources:

https://stackoverflow.com/questions/70584317/git-push-error-dst-refspec-refs-heads-main-matches-more-than-one

[Solved] Could not resolve placeholder ‘XXX‘ in value “${XXX}“

Problem overview:

The code is determined to be bug-free, but it cannot run after switching to a new environment or git from a remote warehouse.

Development environment:

IDEA

reason:

Because idea may have problems recognizing folder types. Especially when there are many switching spaces, GIT codes and new modules. We just need to set the folder type correctly.

Solution:

Set the Resources folder as a resource folder. If there are problems with other folders, the same is true.

After setting, the folder icon changes, indicating success.

[Solved] ERROR: Command errored out with exit status 128: git clone -q

This error occurred when installing git + GitHub web page. The full name is

Collecting git+https://github.com/pytorch/tnt.git@master
  Cloning https://github.com/pytorch/tnt.git (to revision master) to c:\users\lee\appdata\local\temp\pip-req-build-lbtbze6v
  Running command git clone -q https://github.com/pytorch/tnt.git 'C:\Users\lee\AppData\Local\Temp\pip-req-build-lbtbze6v'
  fatal: unable to access 'https://github.com/pytorch/tnt.git/': OpenSSL SSL_read: Connection was reset, errno 10054
WARNING: Discarding git+https://github.com/pytorch/tnt.git@master. Command errored out with exit status 128: git clone -q https://github.com/pytorch/tnt.git 'C:\Users\lee\AppData\Local\Temp\pip-req-build-lbtbze6v' Check the logs for fu
ll command output.
ERROR: Command errored out with exit status 128: git clone -q https://github.com/pytorch/tnt.git 'C:\Users\lee\AppData\Local\Temp\pip-req-build-lbtbze6v' Check the logs for full command output.

Solution:

 pip install git+git://github.com/ildoonet/pytorch-gradual-warmup-lr.git

Successfully installed

Collecting git+git://github.com/ildoonet/pytorch-gradual-warmup-lr.git
  Cloning git://github.com/ildoonet/pytorch-gradual-warmup-lr.git to c:\users\lee\appdata\local\temp\pip-req-build-ncz3svwe
  Running command git clone -q git://github.com/ildoonet/pytorch-gradual-warmup-lr.git 'C:\Users\lee\AppData\Local\Temp\pip-req-build-ncz3svwe'
  Resolved git://github.com/ildoonet/pytorch-gradual-warmup-lr.git to commit 6b5e8953a80aef5b324104dc0c2e9b8c34d622bd
Building wheels for collected packages: warmup-scheduler
  Building wheel for warmup-scheduler (setup.py) ... done
  Created wheel for warmup-scheduler: filename=warmup_scheduler-0.3.2-py3-none-any.whl size=3917 sha256=4cef133c28685f1e5a70364fd6546a3d4d995fe49584781b1024d3707f9f222f
  Stored in directory: C:\Users\lee\AppData\Local\Temp\pip-ephem-wheel-cache-m6_t0cfl\wheels\d2\57\4d\3adb5d109151933485f2b4387f61a90ff8e669f50fc8f1fa14
Successfully built warmup-scheduler
Installing collected packages: warmup-scheduler
Successfully installed warmup-scheduler-0.3.2

[Solved] xdd-plus-fetch qrcode error: Packet timed out,2-error: unknown flag

On xdd-plus-21-12-08, two errors were reported in running XDD. Jiqiren also hung up, no messages were sent, and the service stopped itself.
the following two errors were reported
fetch QRcode error: packet timed out,
2-error: unknown flag

With the help of some Qun friends, the tutorial is summarized as follows
1 Download
https://github.com/764763903a/xdd-plus/releases/tag/v1.7

cd ~
dowload Time is slow, wait patiently. . . .

wget https://github.com/764763903a/xdd-plus/archive/refs/tags/v1.7.tar.gz

tar xzvf v1.7.tar.gz

cd xdd-plus-1.7/qbot/

wget https://github.91chi.fun//https://github.com//764763903a/xdd-plus/releases/download/v1.7/config.yml
This file only needs to change which line of uin, that is, which line of QQ account, and replace it with your own (robot) QQ

[root@VM-4-10-centos qbot]# cat config.yml
# go-cqhttp default configuration file

account: # Account related
   uin: 1565396344 # QQ account
   password:'' # Use scan code to log in when the password is empty
   encrypt: false # Whether to enable password encryption
   status: 0 # Online status Please refer to https://docs.go-cqhttp.org/guide/config.html#Online status
   relogin: # Reconnect settings
     delay: 3 # The first reconnection delay, in seconds
     interval: 3 # Reconnect interval
     max-times: 0 # Maximum number of reconnections, 0 means unlimited
--------------------

cd ..
wget https://github.com.cnpmjs.org/764763903a/xdd-plus/releases/download/v1.7/xdd-linux-amd64
chmod +x  xdd-linux-amd64

cd conf/
cp demo_app.conf app.conf
Here, copy the configuration file of the old version of conf.yaml to the conf/ directory of the new version, and it is not too troublesome to reconfigure
cp ~/xdd-plus/conf/config.yaml. # There is a dot at the end
cd /root/xdd-plus-1.7/
./xdd-linux-amd64
Then scan the QR code to log in to jiqiren's QQ.
Ctrl + c
nohup ./xdd-linux-amd64 &
(shang above Ctrl +c may need to log in again after exiting, here cat nohup.out, and then scan the code again, this is the log output file)

vim conf/config Yaml
change this in the slow query configuration
later: 1 # delay to prevent Black IP. Set the default 60 to 1. The unit is seconds

Then log in to QQ and leave a message if you have other questions

[Solved] Junit.test use error: log4j:WARN No appenders could be found for logger

1. Warning message
Error output message.
log4j:WARN No appenders could be found for logger (org.apache.ibatis.logging.LogFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

Solution:
2.1 No log4j dependency is introduced
Insert the following code in the pom.xml file.

<dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>

Configure the log4j.properties file and put this folder under Src/main/resources

log4j.rootLogger=debug, stdout, R

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=example.log

log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=5

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n


perhaps

# Set root category priority to INFO and its only appender to CONSOLE.
#log4j.rootCategory=INFO, CONSOLE            debug   info   warn error fatal
log4j.rootCategory=debug, CONSOLE, LOGFILE

# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE

# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} %-6r [%15.15t] %-5p %30.30c %x - %m\n

# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=d:\axis.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d{ISO8601} %-6r [%15.15t] %-5p %30.30c %x - %m\n


[Solved] Pytorch loading model specified GPU card number error or failed to specify

According to the pytorch document, when loading the model, you can specify to load the tensor of the model to a specific target GPU
the loading methods are:

>>> torch.load('tensors.pt')
# 1. Load all tensors onto the GPU 0
>>> torch.load('tensors.pt', map_location=torch.device('cuda:0'))
# 2. Load all tensors onto GPU 1
>>> torch.load('tensors.pt', map_location=lambda storage, loc: storage.cuda(1))
# 3. Map tensors from GPU 1 to GPU 0
>>> torch.load('tensors.pt', map_location={'cuda:1':'cuda:0'})

The actual measurement shows that
method 1 is not loaded into the target card at all. The original card on which the model was trained is still loaded into the original old card number, so the assignment fails
in method 3, errors are reported between codes. Location. Startswitch (‘cuda ‘): attributeerror:’ nonetype ‘object has no attribute’ startswitch ‘. After analyzing the code, it is found that this is a bug of torch itself! Pit father
method 2: normally load the tensors on cuda1.